Sourcetype c_rounding_mode = | FE_ToNearest| FE_Upward| FE_Downward| FE_TowardZero
Rounding modes defined in the C99 standard.
Sourceval set_round_downward : unit -> unit Sourceval set_round_upward : unit -> unit Sourceval set_round_nearest_even : unit -> unit Sourceval set_round_toward_zero : unit -> unit Sourceval round_to_single_precision_float : float -> float Sourceval max_single_precision_float : float Sourceval most_negative_single_precision_float : float Sourceval min_denormal : float Sourceval neg_min_denormal : float Sourceval min_single_precision_denormal : float Sourceval neg_min_single_precision_denormal : float Sourceval sys_single_precision_of_string : string -> float Sourcetype parsed_float = {f_nearest : float;f_lower : float;f_upper : float;
} If s is parsed as (n, l, u), then n is the nearest approximation of s with the desired precision. Moreover, l and u are the most precise float such that l <= s <= u, again with this precision.
Consistent with logic_real definition in Cil_types.
parse s parses s and returns the parsed float and its kind (single, double or long double precision) according to its suffix, if any. Strings with no suffix are parsed as double.
Sourceexception Float_Non_representable_as_Int64 of sign Raises Float_Non_representable_as_Int64 if the float value cannot be represented as an Int64 or as an unsigned Int64.
binary representation of -DBL_MAX and DBL_MAX as 64 bits signed integers
binary representation of -FLT_MAX and FLT_MAX as 32 bits signed integers
Sourceval fround : float -> float Rounds to nearest integer, away from zero (like round() in C).
Sourceval trunc : float -> float Rounds to integer, toward zero (like trunc() in C).
Single-precision (32-bit) floating-point wrappers
Sourceval expf : float -> float Sourceval logf : float -> float Sourceval log10f : float -> float Sourceval powf : float -> float -> float Sourceval sqrtf : float -> float Sourceval fmodf : float -> float -> float Sourceval cosf : float -> float Sourceval sinf : float -> float Sourceval atan2f : float -> float -> float Auxiliary functions similar to the ones in the C math library
Sourceval isnan : float -> bool Sourceval isfinite : float -> bool Sourceval nextafter : float -> float -> float Sourceval nextafterf : float -> float -> float