number-0.1.0.0: A library for real numbers

Safe HaskellSafe
LanguageHaskell2010

Data.Number.Functions

Description

Common functions and constants

Synopsis

Documentation

precision :: Number -> Nat Source

Get the precision of a Number (i.e. length)

show' :: Number -> String Source

Alternative show function that pretty prints a Number also doing conversions from Peano numbers

fromList :: [Nat] -> Number Source

Create a Number from a list of naturals

toList :: Number -> [Nat] Source

Convert a Number to a list of naturals (losing the sign)

σ :: Number Source

The infinite continued fraction whose terms are naturals numbers

φ :: Number Source

The golden ratio

π :: Number Source

Pi: the ratio of a circle's circumference to its diameter

e :: Number Source

Euler's number: the base of the natural logarithm