Expand description
Financial-grade precision calculation utilities.
Provides high-precision numerical operations for financial calculations:
- Rounding modes (Round, RoundUp, RoundDown)
- Precision counting modes (DecimalPlaces, SignificantDigits, TickSize)
- Number formatting and parsing
Decimaltype helper functions
Enums§
- Counting
Mode - Precision counting mode.
- Padding
Mode - Output padding mode.
- Rounding
Mode - Rounding mode for precision calculations.
Functions§
- decimal_
to_ precision - Formats a decimal to a specific precision with configurable rounding and counting modes.
- number_
to_ string - Converts a decimal number to string, handling scientific notation.
- precision_
from_ string - Extracts precision (number of decimal places) from a string representation.
- truncate
- Truncates a decimal to the specified number of decimal places, returning a
Decimal. - truncate_
to_ string - Truncates a decimal to the specified number of decimal places without rounding.