| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell98 |
Factory.Math.Radix
Description
- digitSum :: (Ix decimal, Integral base, Integral decimal, Show base, Show decimal) => base -> decimal -> decimal
- digitalRoot :: (Ix decimal, Integral decimal, Show decimal) => decimal -> decimal
- fromBase :: (Integral base, Integral decimal, Read decimal, Show base) => base -> String -> decimal
- toBase :: (Ix decimal, Integral base, Integral decimal, Show base, Show decimal) => base -> decimal -> String
Constants
Functions
digitSum :: (Ix decimal, Integral base, Integral decimal, Show base, Show decimal) => base -> decimal -> decimal Source
digitalRoot :: (Ix decimal, Integral decimal, Show decimal) => decimal -> decimal Source
fromBase :: (Integral base, Integral decimal, Read decimal, Show base) => base -> String -> decimal Source
- Convert the
String-representation of a number in the specified base, to a decimal integer. - Both negative numbers and negative bases are permissible.
toBase :: (Ix decimal, Integral base, Integral decimal, Show base, Show decimal) => base -> decimal -> String Source
- Convert the specified integral decimal quantity, to an alternative base, and represent the result as a
String. - Both negative decimals and negative bases are permissible.
- The conversion to
Charcan only succeed where printable and intelligible characters exist to represent all digits in the chosen base; which in practice means(-36 <= base <= 36).