'Scientific' loses significant digits

Hi: Does anyone know why is this true? ((fromJust . readMaybe) "1.00000000" :: Scientific) == ((fromJust . readMaybe) "1" :: Scientific) -- Alex

On Wed, Aug 26, 2015 at 10:34 AM, Alex
Hi:
Does anyone know why is this true?
((fromJust . readMaybe) "1.00000000" :: Scientific) == ((fromJust . readMaybe) "1" :: Scientific)
Hi Alex, 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.
-- Alex _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
-- Chris Wong (https://lambda.xyz) "Humans find such fascinating ways to waste their time." -- Steven Universe
participants (2)
-
Alex
-
Chris Wong