Module Prime_float
Floating point functions.
val pi : floatpiis the ratio π of the circumference to the diameter of a circle in the Euclidean plane.
val sign : float -> floatsign xis-1.0,0.0, or1.0wherexis negative, zero, or positive, respectively.
val round : float -> floatround xis the whole number closest tox, rounding towards zero in case of a tie.
val to_fraction : ?max_denom:int -> float -> int * intto_fraction xreturns(n, d)such thatn/dis a best rational approximation ofx. The result is based on the continued fraction of the absolute value, with sign copied to the numerator.- parameter max_denom
The maximum denominator to return. The default is currenty 230 to account for rounding errors and the width of
inton 32 bit platforms, but it may be tuned in future versions.