Module Dtype.Value
Arithmetic and comparison on values, as on numbers: a `Bool counts as 0 or 1, an operation on two integers gives an exact integer, and one that involves a float gives a float, in which an integer that rounds past the greatest double is the infinity of its sign. The operators compare an integer and a float exactly, without rounding the integer, and a comparison with NaN is false, except <>, which is true.
to_float v is v as a float: 0. or 1. for a `Bool, and an integer rounded to nearest, ties to even, or to the infinity of its sign if it rounds past the greatest double.
to_z v is v as an integer: 0 or 1 for a `Bool, and a float rounded towards zero.
Raises Invalid_argument if v is an infinity or a NaN.
to_int v is to_z v as an int.
Raises Invalid_argument if v is an infinity or a NaN, or if to_z v does not fit an int.
compare v0 v1 is a total order on values by magnitude, where NaN is less than every other value and equal to itself. Values of equal magnitude compare equal whatever their kind, so `Bool true, `Int 1 and `Float 1. are equal.
v0 // v1 is the quotient of v0 by v1 rounded down.
Raises Division_by_zero if v1 is zero.