package np

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type tag = [
  1. | `MachAr
]
type t = [ `MachAr | `Object ] Obj.t
val of_pyobject : Py.Object.t -> t
val to_pyobject : [> tag ] Obj.t -> Py.Object.t
val create : ?float_conv:Py.Object.t -> ?int_conv:Py.Object.t -> ?float_to_float:Py.Object.t -> ?float_to_str:Py.Object.t -> ?title:string -> unit -> t

Diagnosing machine parameters.

Attributes ---------- ibeta : int Radix in which numbers are represented. it : int Number of base-`ibeta` digits in the floating point mantissa M. machep : int Exponent of the smallest (most negative) power of `ibeta` that, added to 1.0, gives something different from 1.0 eps : float Floating-point number ``beta**machep`` (floating point precision) negep : int Exponent of the smallest power of `ibeta` that, subtracted from 1.0, gives something different from 1.0. epsneg : float Floating-point number ``beta**negep``. iexp : int Number of bits in the exponent (including its sign and bias). minexp : int Smallest (most negative) power of `ibeta` consistent with there being no leading zeros in the mantissa. xmin : float Floating point number ``beta**minexp`` (the smallest in magnitude usable floating value). maxexp : int Smallest (positive) power of `ibeta` that causes overflow. xmax : float ``(1-epsneg) * beta**maxexp`` (the largest in magnitude usable floating value). irnd : int In ``range(6)``, information on what kind of rounding is done in addition, and on how underflow is handled. ngrd : int Number of 'guard digits' used when truncating the product of two mantissas to fit the representation. epsilon : float Same as `eps`. tiny : float Same as `xmin`. huge : float Same as `xmax`. precision : float ``- int(-log10(eps))`` resolution : float ``- 10**(-precision)``

Parameters ---------- float_conv : function, optional Function that converts an integer or integer array to a float or float array. Default is `float`. int_conv : function, optional Function that converts a float or float array to an integer or integer array. Default is `int`. float_to_float : function, optional Function that converts a float array to float. Default is `float`. Note that this does not seem to do anything useful in the current implementation. float_to_str : function, optional Function that converts a single float to a string. Default is ``lambda v:'%24.16e' %v``. title : str, optional Title that is printed in the string representation of `MachAr`.

See Also -------- finfo : Machine limits for floating point types. iinfo : Machine limits for integer types.

References ---------- .. 1 Press, Teukolsky, Vetterling and Flannery, 'Numerical Recipes in C++,' 2nd ed, Cambridge University Press, 2002, p. 31.

val ibeta : t -> int

Attribute ibeta: get value or raise Not_found if None.

val ibeta_opt : t -> int option

Attribute ibeta: get value as an option.

val it : t -> int

Attribute it: get value or raise Not_found if None.

val it_opt : t -> int option

Attribute it: get value as an option.

val machep : t -> int

Attribute machep: get value or raise Not_found if None.

val machep_opt : t -> int option

Attribute machep: get value as an option.

val eps : t -> float

Attribute eps: get value or raise Not_found if None.

val eps_opt : t -> float option

Attribute eps: get value as an option.

val negep : t -> int

Attribute negep: get value or raise Not_found if None.

val negep_opt : t -> int option

Attribute negep: get value as an option.

val epsneg : t -> float

Attribute epsneg: get value or raise Not_found if None.

val epsneg_opt : t -> float option

Attribute epsneg: get value as an option.

val iexp : t -> int

Attribute iexp: get value or raise Not_found if None.

val iexp_opt : t -> int option

Attribute iexp: get value as an option.

val minexp : t -> int

Attribute minexp: get value or raise Not_found if None.

val minexp_opt : t -> int option

Attribute minexp: get value as an option.

val xmin : t -> float

Attribute xmin: get value or raise Not_found if None.

val xmin_opt : t -> float option

Attribute xmin: get value as an option.

val maxexp : t -> int

Attribute maxexp: get value or raise Not_found if None.

val maxexp_opt : t -> int option

Attribute maxexp: get value as an option.

val xmax : t -> float

Attribute xmax: get value or raise Not_found if None.

val xmax_opt : t -> float option

Attribute xmax: get value as an option.

val irnd : t -> int

Attribute irnd: get value or raise Not_found if None.

val irnd_opt : t -> int option

Attribute irnd: get value as an option.

val ngrd : t -> int

Attribute ngrd: get value or raise Not_found if None.

val ngrd_opt : t -> int option

Attribute ngrd: get value as an option.

val epsilon : t -> float

Attribute epsilon: get value or raise Not_found if None.

val epsilon_opt : t -> float option

Attribute epsilon: get value as an option.

val tiny : t -> float

Attribute tiny: get value or raise Not_found if None.

val tiny_opt : t -> float option

Attribute tiny: get value as an option.

val huge : t -> float

Attribute huge: get value or raise Not_found if None.

val huge_opt : t -> float option

Attribute huge: get value as an option.

val precision : t -> float

Attribute precision: get value or raise Not_found if None.

val precision_opt : t -> float option

Attribute precision: get value as an option.

val resolution : t -> float

Attribute resolution: get value or raise Not_found if None.

val resolution_opt : t -> float option

Attribute resolution: get value as an option.

val to_string : t -> string

Print the object to a human-readable representation.

val show : t -> string

Print the object to a human-readable representation.

val pp : Format.formatter -> t -> unit

Pretty-print the object to a formatter.

OCaml

Innovation. Community. Security.