eris.decimal.logical

Decimal logical functions.

An implementation of the General Decimal Arithmetic Specification.

Members

Functions

and
D and(D x, D y)

Performs a logical and of the arguments and returns the result. Implements the 'and' function in the specification. (p. 41)

isLogical
bool isLogical(D arg, string str)

Returns true if the argument is a valid logical decimal number. The sign and exponent must both be zero, and all decimal digits in the coefficient must be either '1' or '0'.

isLogical
bool isLogical(D arg)

Returns true if the argument is a valid logical decimal number. The sign and exponent must both be zero, and all decimal digits in the coefficient must be either '1' or '0'.

lsh
D lsh(D arg, int n, Context context)

Performs a logical shift of the argument by the specified number of decimal digits. Positive values of the second operand shift the argument to the left; negative values shift the argument to the right. If the argument is not a valid logical operand, or if the absolute value of the shift is greater than precision, an INVALID_OPERATION is signaled. Implements the 'shift' function in the specification. (p. 49)

not
D not(D arg)

Inverts and returns a decimal logical number. Implements the 'invert' function in the specification. (p. 44)

or
D or(D x, D y)

Performs a logical or of the arguments and returns the result. Implements the 'or' function in the specification. (p. 41)

rot
D rot(D arg, int n, Context context)

Rotates the argument by the specified number of decimal digits. Positive values of the second operand rotate the argument to the left; negative values rotate the argument to the right. If the argument is not a valid logical operand, or if the absolute value of the rotation is greater than precision, an INVALID_OPERATION is signaled. Implements the 'rotate' function in the specification. (p. 47)

xor
D xor(D x, D y)

Performs a logical xor of the arguments and returns the result. Implements the 'xor' function in the specification. (p. 41)

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>