NumericPrelude-0.0: An experimental alternative hierarchy of numeric type classesContentsIndex
Number.FixedPoint
Portabilityrequires multi-parameter type classes
Stabilityprovisional
Maintainernumericprelude@henning-thielemann.de
Contents
Conversion
other number types
text
Additive
Ring
Field
Algebra
Transcendental
Description
Fixed point numbers. They are implemented as ratios with fixed denominator. Many routines fail for some arguments. When they work, they can be useful for obtaining approximations of some constants. We have not paid attention to rounding errors and thus some of the trailing digits may be wrong.
Synopsis
fromFloat :: RealFrac a => Integer -> a -> Integer
fromFixedPoint :: Integer -> Integer -> Integer -> Integer
showPositionalDec :: Integer -> Integer -> String
showPositionalHex :: Integer -> Integer -> String
showPositionalBin :: Integer -> Integer -> String
showPositionalBasis :: Integer -> Integer -> Integer -> String
liftShowPosToInt :: (Integer -> String) -> Integer -> String
toPositional :: Integer -> Integer -> Integer -> (Integer, [Integer])
add :: Integer -> Integer -> Integer -> Integer
sub :: Integer -> Integer -> Integer -> Integer
mul :: Integer -> Integer -> Integer -> Integer
divide :: Integer -> Integer -> Integer -> Integer
recip :: Integer -> Integer -> Integer
magnitudes :: [Integer]
sqrt :: Integer -> Integer -> Integer
root :: Integer -> Integer -> Integer -> Integer
evalPowerSeries :: [Rational] -> Integer -> Integer -> Integer
cos :: Integer -> Integer -> Integer
sin :: Integer -> Integer -> Integer
tan :: Integer -> Integer -> Integer
arctanSmall :: Integer -> Integer -> Integer
arctan :: Integer -> Integer -> Integer
piConst :: Integer -> Integer
expSmall :: Integer -> Integer -> Integer
eConst :: Integer -> Integer
recipEConst :: Integer -> Integer
exp :: Integer -> Integer -> Integer
approxLogBase :: Integer -> Integer -> (Int, Integer)
lnSmall :: Integer -> Integer -> Integer
ln :: Integer -> Integer -> Integer
Conversion
other number types
fromFloat :: RealFrac a => Integer -> a -> Integer
fromFixedPoint :: Integer -> Integer -> Integer -> Integer
denominator conversion
text
showPositionalDec :: Integer -> Integer -> String
very efficient because it can make use of the decimal output of show
showPositionalHex :: Integer -> Integer -> String
showPositionalBin :: Integer -> Integer -> String
showPositionalBasis :: Integer -> Integer -> Integer -> String
liftShowPosToInt :: (Integer -> String) -> Integer -> String
toPositional :: Integer -> Integer -> Integer -> (Integer, [Integer])
Additive
add :: Integer -> Integer -> Integer -> Integer
sub :: Integer -> Integer -> Integer -> Integer
Ring
mul :: Integer -> Integer -> Integer -> Integer
Field
divide :: Integer -> Integer -> Integer -> Integer
recip :: Integer -> Integer -> Integer
Algebra
magnitudes :: [Integer]
sqrt :: Integer -> Integer -> Integer
root :: Integer -> Integer -> Integer -> Integer
Transcendental
evalPowerSeries :: [Rational] -> Integer -> Integer -> Integer
cos :: Integer -> Integer -> Integer
sin :: Integer -> Integer -> Integer
tan :: Integer -> Integer -> Integer
arctanSmall :: Integer -> Integer -> Integer
arctan :: Integer -> Integer -> Integer
piConst :: Integer -> Integer
expSmall :: Integer -> Integer -> Integer
eConst :: Integer -> Integer
recipEConst :: Integer -> Integer
exp :: Integer -> Integer -> Integer
approxLogBase :: Integer -> Integer -> (Int, Integer)
lnSmall :: Integer -> Integer -> Integer
ln :: Integer -> Integer -> Integer
Produced by Haddock version 0.7