Expand description
Cross-type conversions between OxiNum numeric types.
These functions convert between integers, floats, and rationals, with explicit precision control where lossy conversions are involved.
Functions§
- float_
from_ str - Parse a decimal float (
DBig) from a string. - float_
to_ rational - Convert a decimal float (
DBig) to an exact rational (RBig). - int_
to_ float - Convert an integer (
IBig) to a decimal float (DBig). - int_
to_ rational - Convert an integer (
IBig) to an exact rational (RBig). - rational_
to_ float - Convert a rational (
RBig) to a decimal float (DBig) at the given number of significant decimal digits. - rational_
to_ int - Convert a rational (
RBig) to an integer (IBig) by truncation (rounding toward zero).