Crate dec_number_sys
source ·Expand description
Rust bindings for The decNumber C library by IBM Fellow Mike Cowlishaw.
Structs
- Decimal context.
- Arbitrary precision decimal number.
Constants
- Length in bytes of DecDouble union.
- Maximum length of the DecDouble string.
- Buffer for DecDouble string.
- Convenient constant for DecDouble equal to positive zero.
- Sign mask.
- Infinity mask: 1 = Infinity.
- Initializes context to ANSI X3-274 defaults.
- Initializes context to IEEE 754 defaults, 32-bit.
- Initializes context to IEEE 754 defaults, 64-bit.
- Initializes context to IEEE 754 defaults, 128-bit.
- Not-a-Number mask: 1 = NaN.
- Sign mask: 1 = negative, 0 = positive or zero.
- DecNumber value 1000000000 (billion).
- DecNumber value 100 (hundred).
- DecNumber value 1000000 (million).
- DecNumber value 1 (one).
- DecNumber value 10 (ten).
- DecNumber value 1000 (thousand).
- DecNumber value 2 (two).
- DecNumber value 0 (zero).
- DecQuad value
1000000000
(billion). - Length in bytes of the DecQuad union.
- DecQuad value
100
(hundred). - DecQuad value
1000000
(million). - DecQuad value
1
(one). - Maximum precision (digits) for 128-bit decimals.
- Maximum length of the DecQuad string.
- DecQuad string buffer.
- DecQuad value
10
(ten). - DecQuad value
1000
(thousand). - DecQuad value
2
(two). - DecQuad value
0
(zero). - Round for re-round.
- Round towards +Infinity.
- Round towards 0 (truncate).
- Round towards -Infinity.
- 0.5 rounds down.
- 0.5 rounds to nearest even.
- 0.5 rounds up.
- Round away from 0.
- Length in bytes of DecSingle union.
- Maximum length of the DecSingle string.
- Buffer for DecSingle string.
- Convenient constant for DecSingle equal to positive zero.
- Signalling Not-a-Number mask: 1 = sNaN.
- Special value mask: 1 = special (Infinity, NaN or sNaN).
Functions
- Converts unsigned integer into BCD representation.
- Converts unsigned integer into BCD representation with maximum digits that fit into DecQuad.
- Unsafe binding to decContextDefault function.
- Unsafe binding to decContextGetStatus function.
- Unsafe binding to decContextStatusToString function.
- Unsafe binding to decContextZeroStatus function.
- Unsafe binding to decDoubleAdd function.
- Unsafe binding to decDoubleFromString function.
- Unsafe binding to decDoubleToString function.
- Unsafe binding to decDoubleZero function.
- Unsafe binding to decNumberAdd function.
- Unsafe binding to decNumberCompare function.
- Unsafe binding to decNumberDivide function.
- Unsafe binding to decNumberExp function.
- Unsafe binding to decNumberFromInt32 function.
- Unsafe binding to decNumberFromString function.
- Unsafe binding to decNumberFromUInt32 function.
- Unsafe binding to decNumberLn function.
- Unsafe binding to decNumberMinus function.
- Unsafe binding to decNumberMultiply function.
- Unsafe binding to decNumberPlus function.
- Unsafe binding to decNumberPower function.
- Unsafe binding to decNumberQuantize function.
- Unsafe binding to decNumberReduce function.
- Unsafe binding to decNumberRescale function.
- Unsafe binding to decNumberScaleB function.
- Unsafe binding to decNumberSetBCD function.
- Unsafe binding to decNumberSquareRoot function.
- Unsafe binding to decNumberSubtract function.
- Unsafe binding to decNumberToString function.
- Unsafe binding to decNumberZero function.
- Unsafe binding to decQuadAbs function.
- Unsafe binding to decQuadAdd function.
- Unsafe binding to decQuadAnd function.
- Unsafe binding to decDoubleCanonical function.
- Unsafe binding to decQuadCompare function.
- Unsafe binding to decQuadCompareSignal function.
- Unsafe binding to decQuadCompareTotal function.
- Unsafe binding to decQuadCompareTotalMag function.
- Unsafe binding to decQuadCopy function.
- Unsafe binding to decQuadCopyAbs function.
- Unsafe binding to decQuadCopyNegate function.
- Unsafe binding to decQuadCopySign function.
- Unsafe binding to decQuadDigits function.
- Unsafe binding to decQuadDivide function.
- Unsafe binding to decQuadDivideInteger function.
- Unsafe binding to decQuadFMA function.
- Unsafe binding to decQuadFromBCD function.
- Unsafe binding to decQuadFromInt32 function.
- Unsafe binding to decQuadFromString function.
- Unsafe binding to decQuadFromUInt32 function.
- Unsafe binding to decQuadFromWider function.
- Unsafe binding to decQuadGetCoefficient function.
- Unsafe binding to decQuadGetExponent function.
- Unsafe binding to decQuadInvert function.
- Unsafe binding to decQuadIsCanonical function.
- Unsafe binding to decQuadIsFinite function.
- Unsafe binding to decQuadIsInfinite function.
- Unsafe binding to decQuadIsInteger function.
- Unsafe binding to decQuadIsLogical function.
- Unsafe binding to decQuadIsNaN function.
- Unsafe binding to decQuadIsNegative function.
- Unsafe binding to decQuadIsNormal function.
- Unsafe binding to decQuadIsPositive function.
- Unsafe binding to decQuadIsSignaling function.
- Unsafe binding to decQuadIsSignalling function.
- Unsafe binding to decQuadIsZero function.
- Unsafe binding to decQuadMinus function.
- Unsafe binding to decQuadMultiply function.
- Unsafe binding to decQuadPlus function.
- Unsafe binding to decQuadQuantize function.
- Unsafe binding to decQuadReduce function.
- Unsafe binding to decQuadRemainder function.
- Unsafe binding to decQuadScaleB function.
- Unsafe binding to decQuadSubtract function.
- Unsafe binding to decQuadToInt32 function.
- Unsafe binding to decQuadToIntegralValue function.
- Unsafe binding to decQuadToString function.
- Unsafe binding to decQuadToUInt32 function.
- Unsafe binding to decQuadZero function.
- Unsafe binding to decSingleFromString function.
- Unsafe binding to decSingleFromWider function.
- Unsafe binding to decSingleToString function.
- Unsafe binding to decSingleToWider function.
- Unsafe binding to decSingleZero function.
- Returns decimal context initialized for 32-bit decimals.
- Returns decimal context initialized for 64-bit decimals.
- Returns decimal context initialized for 128-bit decimals.
- Returns decimal context initialized with maximum specified number of digits.
- Safe binding to decContextDefault function.
- Safe binding to decContextGetStatus function.
- Safe binding to decContextStatusToString function.
- Safe binding to decContextZeroStatus function.
- Safe binding to decDoubleAdd function.
- Safe binding to decDoubleFromString function.
- Safe binding to decDoubleToString function.
- Safe binding to decDoubleZero function.
- Safe binding to decNumberAdd function.
- Safe binding to decNumberCompare function.
- Safe binding to decNumberDivide function.
- Safe binding to decNumberExp function.
- Safe binding to decNumberFromInt32 function.
- Safe binding to decNumberFromString function.
- Safe binding to decNumberFromUInt32 function.
- Safe binding to decNumberIsNegative function.
- Safe binding to decNumberIsZero function.
- Safe binding to decNumberLn function.
- Safe binding to decNumberMinus function.
- Safe binding to decNumberMultiply function.
- Safe binding to decNumberPlus function.
- Safe binding to decNumberPower function.
- Safe binding to decNumberQuantize function.
- Safe binding to decNumberReduce function.
- Safe binding to decNumberRescale function.
- Safe binding to decNumberScaleB function.
- Safe binding to decNumberSquareRoot function.
- Safe binding to decNumberSubtract function.
- Safe binding to decNumberToString function.
- Safe binding to decNumberZero function.
- Safe binding to decQuadAbs function.
- Safe binding to decQuadAdd function.
- Safe binding to decQuadAnd function.
- Safe binding to decQuadCanonical function.
- Safe binding to decQuadCompare function.
- Safe binding to decQuadCompareSignal function.
- Safe binding to decQuadCompareTotal function.
- Safe binding to decQuadCompareTotalMag function.
- Safe binding to decQuadCopy function.
- Safe binding to decQuadCopyAbs function.
- Safe binding to decQuadCopyNegate function.
- Safe binding to decQuadCopySign function.
- Safe binding to decQuadDigits function.
- Safe binding to decQuadDivide function.
- Safe binding to decQuadDivideInteger function.
- Safe binding to decQuadFMA function.
- Safe binding to decQuadFromBCD function.
- Safe binding to decQuadFromInt32 function.
- Safe binding to decQuadFromString function.
- Safe binding to decQuadFromUInt32 function.
- Safe binding to decQuadFromWider function.
- Safe binding to decQuadGetCoefficient function.
- Safe binding to decQuadGetExponent function.
- Safe binding to decQuadInvert function.
- Safe binding to decQuadIsCanonical function.
- Safe binding to decQuadIsFinite function.
- Safe binding to decQuadIsInfinite function.
- Safe binding to decQuadIsInteger function.
- Safe binding to decQuadIsLogical function.
- Safe binding to decQuadIsNaN function.
- Safe binding to decQuadIsNegative function.
- Safe binding to decQuadIsNormal function.
- Safe binding to decQuadIsPositive function.
- Safe binding to decQuadIsSignaling function.
- Safe binding to decQuadIsSignalling function.
- Safe binding to decQuadIsZero function.
- Safe binding to decQuadMinus function.
- Safe binding to decQuadMultiply function.
- Safe binding to decQuadPlus function.
- Safe binding to decQuadQuantize function.
- Safe binding to decQuadReduce function.
- Safe binding to decQuadRemainder function.
- Safe binding to decQuadScaleB function.
- Safe binding to decQuadSubtract function.
- Safe binding to decQuadToInt32 function.
- Safe binding to decQuadToIntegralValue function.
- Safe binding to decQuadToString function.
- Safe binding to decQuadToUInt32 function.
- Safe binding to decQuadZero function.
- Safe binding to decSingleFromString function.
- Safe binding to decSingleToString function.
- Safe binding to decSingleZero function.
- Unsafe binding to decimal32FromNumber function.
- Unsafe binding to decimal32ToNumber function.
- Safe binding to decimal32FromNumber function.
- Safe binding to decimal32ToNumber function.
- Unsafe binding to decimal64FromNumber function.
- Unsafe binding to decimal64ToNumber function.
- Safe binding to decimal64FromNumber function.
- Safe binding to decimal64ToNumber function.
- Unsafe binding to decimal128FromNumber function.
- Unsafe binding to decimal128ToNumber function.
- Safe binding to decimal128FromNumber function.
- Safe binding to decimal128ToNumber function.
Unions
- 64-bit decimal number.
- 128-bit decimal number.
- 32-bit decimal number.