Module LDouble
val to_float : t -> float
Convert a long double to a float. The result is unspecified if the argument is either too large or too small to be represented as a
float
.
val of_float : float -> t
Create a long double from a float
val to_int : t -> int
Convert a long double to an int. The result is unspecified if the argument is NAN or falls outside the range of representable integers.
val of_int : int -> t
Create a long double from an int
val to_string : ?width:int -> ?prec:int -> t -> string
Convert a long double to a string.
width
specifies the minimum number of digits to format the string with. A negative value left aligns. The default is 0.prec
specifies the number of digits after the decimal point. The default is 6.
val of_string : string -> t
Create a long double from a string
val expm1 : t -> t
expm1 x
computesexp x -. 1.0
, giving numerically-accurate results even ifx
is close to0.0
.
val log1p : t -> t
log1p x
computeslog(1.0 +. x)
(natural logarithm), giving numerically-accurate results even ifx
is close to0.0
.
val copysign : t -> t -> t
copysign x y
returns a float whose absolute value is that ofx
and whose sign is that ofy
.
val modf : t -> t * t
return
(fractional,integer)
parts of number.Known fatal bug on mingw32; see https://sourceforge.net/p/mingw-w64/bugs/478
val classify : t -> Stdlib.fpclass
Return the class of the given floating-point number: normal, subnormal, zero, infinite, or not a number.
val min_float : t
The smallest positive, non-zero, non-denormalized value
val max_float : t
The largest positive finite value
val epsilon : t
The difference between
1.0
and the smallest exactly representable floating-point number greater than1.0
.
val nan : t
A special floating-point value denoting the result of an undefined operation such as
0.0 /. 0.0
. Stands for 'not a number'.
val infinity : t
Positive infinity
val neg_infinity : t
Negative infinity
val zero : t
0.0
val one : t
1.0