Copyright | (c) Henning Thielemann 2006 |
---|---|
Maintainer | numericprelude@henning-thielemann.de |
Stability | provisional |
Portability | requires multi-parameter type classes |
Safe Haskell | None |
Language | Haskell98 |
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.
- fromFloat :: C 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
- tan :: Integer -> Integer -> Integer
- sin :: 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
text
showPositionalDec :: Integer -> Integer -> String Source
very efficient because it can make use of the decimal output of show
showPositionalHex :: Integer -> Integer -> String Source
showPositionalBin :: Integer -> Integer -> String Source
Additive
Ring
Field
Algebra
magnitudes :: [Integer] Source
Transcendental
arctanSmall :: Integer -> Integer -> Integer Source
recipEConst :: Integer -> Integer Source