signature MLTON_REAL =
sig
type t
val fromWord: word -> t
val fromLargeWord: LargeWord.word -> t
val toWord: IEEEReal.rounding_mode -> t -> word
val toLargeWord: IEEEReal.rounding_mode -> t -> LargeWord.word
end
-
type tthe type of reals. For
MLton.LargeRealthis isLargeReal.real, forMLton.Realthis isReal.real, forMLton.Real32this isReal32.real, forMLton.Real64this isReal64.real. -
fromWord w -
fromLargeWord wconvert the word
wto a real value. If the value ofwis larger than (the appropriate)REAL.maxFinite, then infinity is returned. Ifwcannot be exactly represented as a real value, then the current rounding mode is used to determine the resulting value. -
toWord mode r -
toLargeWord mode rconvert the argument
rto a word type using the specified rounding mode. They raiseOverflowif the result is not representable, in particular, ifris an infinity. They raiseDomainifris NaN. -
MLton.Real32.castFromWord w -
MLton.Real64.castFromWord wconvert the argument
wto a real type as a bit-wise cast. -
MLton.Real32.castToWord r -
MLton.Real64.castToWord rconvert the argument
rto a word type as a bit-wise cast.