cookbook-3.0.1.1: Tiered general-purpose libraries with domain-specific applications.

Copyright(c) 2014 by Nate Pisarski
LicenseBSD3
Maintainernathanpisarski@gmail.com
StabilityStable
PortabilityPortable (Standalone - ghc)
Safe HaskellSafe
LanguageHaskell98

Cookbook.Recipes.Math

Description

Library for working with numbers more easily. It includes somewhat lazy functions for when a lambda will clutter code up too much, as well as more involved mathematical formulae.

Synopsis

Documentation

inc :: Enum a => a -> a Source #

Increase value by one.

dec :: Enum a => a -> a Source #

Decrease value by one,

sqr :: Num a => a -> a Source #

Multiply a number by itself.

avg :: Fractional a => [a] -> a Source #

Find the average of a group of Fractionals.

stdev :: (Fractional a, Floating a) => [a] -> a Source #

Find the standard deviation of a list of data.

fact :: (Num a, Enum a) => a -> a Source #

Factorial, from 1 to point.