Make fromInteger use round-to-nearest-even for Float and Double
This change makes fromInteger :: Integer -> {Float,Double}
use round-to-nearest-even mode.
Fixes #15926 (closed), #17231 (closed), #17782 (closed).
A few concerns:
-
integerToFloat#
andintegerToDouble#
were moved fromGHC.Num.Integer
(ghc-bignum) toGHC.Float
(base). -
GHC/Float.hs-boot
was added to keepGHC.Integer.floatFromInteger
/doubleFromInteger
. Is this okay? Or should I just removefloatFromInteger
anddoubleFromInteger
?GHC.Integer.floatFromInteger
anddoubleFromInteger
were removed.
Edited by arata, mizuki