eris.decimal.context

Arithmetic context for floating-point decimal arithmetic.

An implementation of the General Decimal Arithmetic Specification.

Members

Aliases

CEILING
alias CEILING = Round.ceiling
Undocumented in source.
FLOOR
alias FLOOR = Round.floor
Undocumented in source.
HALF_DOWN
alias HALF_DOWN = Round.halfDown
Undocumented in source.
HALF_EVEN
alias HALF_EVEN = Round.halfEven
Undocumented in source.
HALF_UP
alias HALF_UP = Round.halfUp
Undocumented in source.
ROUND_DOWN
alias ROUND_DOWN = Round.down
Undocumented in source.
ROUND_NONE
alias ROUND_NONE = Round.none
Undocumented in source.
ROUND_UP
alias ROUND_UP = Round.up
Undocumented in source.

Classes

ClampedException
class ClampedException

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.

DecimalException
class DecimalException

The base class for all decimal arithmetic exceptions.

DivByZeroException
class DivByZeroException

Raised when a non-zero dividend is divided by zero. General Decimal Arithmetic Specification, p. 15.

InexactException
class InexactException

Raised when a result is not exact (one or more non-zero coefficient digits were discarded during rounding). General Decimal Arithmetic Specification, p. 15.

InvalidOperationException
class InvalidOperationException

Raised when a result would be undefined or impossible. General Decimal Arithmetic Specification, p. 15.

OverflowException
class OverflowException

Raised when the exponent of a result is too large to be represented. General Decimal Arithmetic Specification, p. 15.

RoundedException
class RoundedException

Raised when a result has been rounded (that is, some zero or non-zero coefficient digits were discarded). General Decimal Arithmetic Specification, p. 15.

SubnormalException
class SubnormalException

Raised when a result is subnormal (its adjusted exponent is less than the minimum exponent) before any rounding. General Decimal Arithmetic Specification, p. 15.

UnderflowException
class UnderflowException

Raised when a result is both subnormal and inexact. General Decimal Arithmetic Specification, p. 15.

Enums

INVALID_OPERATION
anonymousenum INVALID_OPERATION

Flags: The available flags and trap-enablers.

Round
enum Round

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.

Structs

Context
struct Context

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

ContextFlags
struct ContextFlags

Variables

Bid32
enum Context Bid32;

Decimal64 BID

Bid64
enum Context Bid64;

Decimal64 BID

DefaultContext
enum Context DefaultContext;

Pre-defined default context for decimal numbers.

DoubleContext
enum Context DoubleContext;

Approximates floating-point double numbers.

FloatContext
enum Context FloatContext;

Approximates floating-point float numbers.

RealContext
enum Context RealContext;

Approximates floating-point real numbers.

TestContext
enum Context TestContext;
Undocumented in source.
contextFlags
enum ContextFlags contextFlags;
Undocumented in source.

Meta

Authors

Paul D. Anderson

Standards

Conforms to the General Decimal Arithmetic Specification, Version 1.70, (25 March 2009).

License

<a href="http://www.boost.org/LICENSE_1_0.txt">Boost License 1.0</a>