I would like to be able to convert a large Double
to an Integer
, but it seems that the Frege Haskell implementation of floor
does not yield an Integral
type. Instead, it seems to be implemented to interface with way Java does it, and takes a Floating
type to a Double
, Floating r => r -> Double
. I could use round
, but that rounds rather than truncate (though I might be able to subtract 0.5 and then round). I'd rather work without needing to resort to using Int
or Long
, which, as wide as the latter is, is still limited in precision.
Any way to go about flooring a floating point type to an arbitrary precision integer type?