[Haskell-cafe] 'Scientific' loses significant digits
lambda.fairy at gmail.com
Wed Aug 26 00:00:51 UTC 2015
On Wed, Aug 26, 2015 at 10:34 AM, Alex <alex323 at gmail.com> wrote:
> Does anyone know why is this true?
> ((fromJust . readMaybe) "1.00000000" :: Scientific) == ((fromJust . readMaybe) "1" :: Scientific)
This is intended behavior.
Scientific's primary use case is as an intermediate type, to be
converted to e.g. Double or Integer later. So there's no need for it
to account for significant digits.
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
Chris Wong (https://lambda.xyz)
"Humans find such fascinating ways to waste their time."
-- Steven Universe
More information about the Haskell-Cafe