:: Int -> Float -package:llvm-hs-pure package:numeric-prelude

Convert from an Int.
Euclidean norm of a vector.
\x -> ceiling (-x) == negate (floor (x::Double) :: Integer)
\x -> ceiling (-x) == negate (floor (x::Rational) :: Integer)
\x -> ceiling (-x) == negate (floor (x::Double) :: Integer)
\x -> ceiling (-x) == negate (floor (x::Rational) :: Integer)
This function rounds to the closest integer. For fraction x == 0.5 it rounds away from zero. This function is not the result of an ingenious mathematical insight, but is simply a kind of rounding that is the fastest on IEEE floating point architectures.
It should hold
realToField = fromRational' . toRational
but it should be much more efficient for particular pairs of types, such as converting Float to Double. This achieved by optimizer rules.