Expand description
Numeric readings and their total order, shared by every comparison path.
- An integer reads as an exact
i128.i128holds everyi64and everyu64. - A fractional
Decimalreads as an exactDecimal. ADECIMALcell is stored as its text, so numeric text with a fraction reads as aDecimaltoo. - A float reads as an
f64. - Integer and decimal pairs compare exactly. An integer against a float
compares exactly. A decimal against a float compares as
f64. - NaN sorts above every number and equals NaN, as in PostgreSQL. The order is total, so a sort over it never panics.
Enums§
- Numeric
- The numeric reading of a value for comparison and summation.
Functions§
- cmp_f64
- Total order of two floats. NaN sorts above every number and equals NaN.
-0.0equals0.0. - cmp_
numeric - Total order of two numeric readings. See the module docs for the rule.
- decimal_
reading - An integral
Decimalas an exact integer, any other as an exactDecimal. - numeric_
bucket_ bits - The
f64a numeric reading rounds to, by the same conversioncmp_numericuses for a decimal against a float. Two readingscmp_numericordersEqualround to the samef64, with-0.0read as0.0and every NaN as one NaN. Distinct readings can share anf64, so this is a hash bucket, never an equality. - numeric_
eq - Equality of two numeric readings for a coerced
=:cmp_numericorders the pairEqual. Exact for every pair, as PostgreSQL float=is, and NaN equals NaN. - parse_
numeric_ str - A numeric string read as a number: integer text as an exact integer,
fractional decimal text as an exact
Decimal, and any other float text (an exponent, a fraction past theDecimalprecision,NaN,inf) as anf64.Nonefor non-numeric text.