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

PortabilityPortable (Standalone - ghc)
StabilityStable
Maintainernathanpisarski@gmail.com
Safe HaskellSafe-Inferred

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 -> aSource

Increase value by one.

dec :: Enum a => a -> aSource

Decrease value by one,

sqr :: Num a => a -> aSource

Multiply a number by itself.

avg :: Fractional a => [a] -> aSource

Find the average of a group of Fractionals.

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

Find the standard deviation of a list of data.

fact :: (Num a, Enum a) => a -> aSource

Factorial, from 1 to point.