module Gsl_ieee: sig .. end
IEEE floating-point arithmetic
Representation of floating point numbers
type ieee_type =
| |
NAN |
| |
INF |
| |
NORMAL |
| |
DENORMAL |
| |
ZERO |
type float_rep = {
|
sign : int; |
|
mantissa : string; |
|
exponent : int; |
|
ieee_type : ieee_type; |
}
val rep_of_float : float -> float_rep
val print : float -> string
IEEE environment
type precision =
| |
SINGLE |
| |
DOUBLE |
| |
EXTENDED |
type rounding =
| |
TO_NEAREST |
| |
DOWN |
| |
UP |
| |
TO_ZERO |
type exceptions =
| |
MASK_INVALID |
| |
MASK_DENORMALIZED |
| |
MASK_DIVISION_BY_ZERO |
| |
MASK_OVERFLOW |
| |
MASK_UNDERFLOW |
| |
MASK_ALL |
| |
TRAP_INEXACT |
val set_mode : ?precision:precision ->
?rounding:rounding -> exceptions list -> unit
val env_setup : unit -> unit
FPU status word
type excepts =
| |
FE_INEXACT |
| |
FE_DIVBYZERO |
| |
FE_UNDERFLOW |
| |
FE_OVERFLOW |
| |
FE_INVALID |
| |
FE_ALL_EXCEPT |
val clear_except : excepts list -> unit
val test_except : excepts list -> excepts list