You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Read instance for Double is completely incorrect!
Expected Behavior
That show . read = id.
Actual Behavior
It seems like the fractional part is computed wildly incorrectly. For example read "42.42" :: Double yields 66.28125. It seems the error is enlarged as the numbers grow. Here is the output of reading the doubles from 0 to 2 in increments of 0.1.
Note that Float exhibits the same kind of erroneous behaviour, whereas the types from Data.Fixed work as expected.
I've observed this behaviour both in the eta repl and when running the code directly.
Possible Fix
I assume this must've been working before but was a regression introduced in the recent port of base-4.11.1.0.
Your Environment
Did you install an older version of Eta/Etlas before? No
Current Eta & Etlas version:
Eta Version 0.8.6b2, Git Revision 107507ceb487529370d987256a4996cd07450323
etlas version 1.5.1.0 compiled using version 2.1.0.0 of the etlas-cabal library
Operating System and version: Ubuntu 18.04
Link to your project:
The text was updated successfully, but these errors were encountered:
Description
The
Read
instance forDouble
is completely incorrect!Expected Behavior
That
show . read = id
.Actual Behavior
It seems like the fractional part is computed wildly incorrectly. For example
read "42.42" :: Double
yields66.28125
. It seems the error is enlarged as the numbers grow. Here is the output of reading the doubles from 0 to 2 in increments of 0.1.Note that
Float
exhibits the same kind of erroneous behaviour, whereas the types fromData.Fixed
work as expected.I've observed this behaviour both in the eta repl and when running the code directly.
Possible Fix
I assume this must've been working before but was a regression introduced in the recent port of
base-4.11.1.0
.Your Environment
Eta Version 0.8.6b2, Git Revision 107507ceb487529370d987256a4996cd07450323
etlas version 1.5.1.0 compiled using version 2.1.0.0 of the etlas-cabal library
The text was updated successfully, but these errors were encountered: