Raised when the exponent of a result has been altered or constrained in order to fit the constraints of a specific concrete representation. General Decimal Arithmetic Specification, p. 15.
The base class for all decimal arithmetic exceptions.
Raised when a non-zero dividend is divided by zero. General Decimal Arithmetic Specification, p. 15.
Raised when a result is not exact (one or more non-zero coefficient digits were discarded during rounding). General Decimal Arithmetic Specification, p. 15.
Raised when a result would be undefined or impossible. General Decimal Arithmetic Specification, p. 15.
Raised when the exponent of a result is too large to be represented. General Decimal Arithmetic Specification, p. 15.
Raised when a result has been rounded (that is, some zero or non-zero coefficient digits were discarded). General Decimal Arithmetic Specification, p. 15.
Raised when a result is subnormal (its adjusted exponent is less than the minimum exponent) before any rounding. General Decimal Arithmetic Specification, p. 15.
Raised when a result is both subnormal and inexact. General Decimal Arithmetic Specification, p. 15.
Flags: The available flags and trap-enablers.
The available rounding modes. For cumulative operations use the halfEven mode to prevent accumulation of errors. Otherwise, the halfUp and halfDown modes are satisfactory. The up, down, floor, and ceiling modes are also useful for some operations. General Decimal Arithmetic Specification, p. 13-14.
Decimal arithmetic operations are governed by their context. The context specifies the precision (number of decimal digits) the maximum exponent value and the rounding mode in place for the operation. The result of most operations will be rounded to the type precision using the context rounding mode
Decimal64 BID
Decimal64 BID
Pre-defined default context for decimal numbers.
Approximates floating-point double numbers.
Approximates floating-point float numbers.
Approximates floating-point real numbers.
Copyright 2009-2016 by Paul D. Anderson.
Conforms to the General Decimal Arithmetic Specification, Version 1.70, (25 March 2009).
<a href="http://www.boost.org/LICENSE_1_0.txt">Boost License 1.0</a>
Arithmetic context for floating-point decimal arithmetic.
An implementation of the General Decimal Arithmetic Specification.