[Haskell-cafe] Re: Just for a laugh...
Jon Fairbairn
jon.fairbairn at cl.cam.ac.uk
Thu May 31 16:27:22 EDT 2007
"David House" <dmhouse at gmail.com> writes:
> On 31/05/07, Andrew Coppin <andrewcoppin at btinternet.com> wrote:
> > If you're bored... can you come up with a solution to this?
>
> Try using floatToDigits:
> http://haskell.org/ghc/docs/latest/html/libraries/base/Numeric.html#v%3AfloatToDigits
>
> "floatToDigits takes a base and a non-negative RealFloat number, and
> returns a list of digits and an exponent."
I think you also need floatRadix and floatDigits.
--
Jón Fairbairn Jon.Fairbairn at cl.cam.ac.uk
More information about the Haskell-Cafe
mailing list