Skip to main content

Module numeric_ops

Module numeric_ops 

Source

Constants§

EPSILON
ROUNDING_HALF
SCALES
UNITY
UNITY_F64

Traits§

NumericOps

Functions§

fixpoint
Convert float to a fixed-point number
fixpoint_unit
Exact TeX fixed-point unit conversion: floor(round(float·65536)·num/den), computed in integer (i128) arithmetic.
kround
An attempt at rounding floats to integers (like scaled points), in a (hopefully) Knuthian manner (like round_decimals \S102 in Tex The Program)
round_to
Round $number to $prec decimals (0…6) attempting to do so portably.