floor package:numeric-prelude

\x -> ceiling (-x) == negate (floor (x::Double) :: Integer)
\x -> ceiling (-x) == negate (floor (x::Rational) :: Integer)
The generic rounding functions need a number of operations proportional to the number of binary digits of the integer portion. If operations like multiplication with two and comparison need time proportional to the number of binary digits, then the overall rounding requires quadratic time.
RealRing.genericFloor =~= (NP.floor :: Double -> Integer)
RealRing.genericFloor =~= (NP.floor :: Rational -> Integer)