#include "decNumber.h"


Go to the source code of this file.
Data Types | |
| type | decimal32 |
Defines | |
| #define | DECIMAL32 |
| #define | DEC32NAME "decimal32" |
| #define | DEC32FULLNAME "Decimal 32-bit Number" |
| #define | DEC32AUTHOR "Mike Cowlishaw" |
| #define | DECIMAL32_Bytes 4 |
| #define | DECIMAL32_Pmax 7 |
| #define | DECIMAL32_Emax 96 |
| #define | DECIMAL32_Emin -95 |
| #define | DECIMAL32_Bias 101 |
| #define | DECIMAL32_String 15 |
| #define | DECIMAL32_Ehigh (DECIMAL32_Emax+DECIMAL32_Bias-DECIMAL32_Pmax+1) |
| #define | DECNUMDIGITS DECIMAL32_Pmax |
| #define | DECIMAL_NaN 0x7c |
| #define | DECIMAL_sNaN 0x7e |
| #define | DECIMAL_Inf 0x78 |
| #define | decimal32Sign(d) ((unsigned)(d)->bytes[0]>>7) |
| #define | decimal32Comb(d) (((d)->bytes[0] & 0x7c)>>2) |
| #define | decimal32ExpCon(d) |
| #define | decimal32SetSign(d, b) |
| #define | decimal32SetExpCon(d, e) |
Functions/Subroutines | |
| decimal32 * | decimal32FromString (decimal32 *, const char *, decContext *) |
| char * | decimal32ToString (const decimal32 *, char *) |
| char * | decimal32ToEngString (const decimal32 *, char *) |
| decimal32 * | decimal32FromNumber (decimal32 *, const decNumber *, decContext *) |
| decNumber * | decimal32ToNumber (const decimal32 *, decNumber *) |
| #define DEC32AUTHOR "Mike Cowlishaw" |
Definition at line 35 of file decimal32.h.
| #define DEC32FULLNAME "Decimal 32-bit Number" |
Definition at line 34 of file decimal32.h.
| #define DEC32NAME "decimal32" |
Definition at line 33 of file decimal32.h.
| #define DECIMAL32 |
Definition at line 32 of file decimal32.h.
| #define DECIMAL32_Bias 101 |
Definition at line 42 of file decimal32.h.
Referenced by decimal32FromNumber(), and decimal32ToNumber().
| #define DECIMAL32_Bytes 4 |
Definition at line 38 of file decimal32.h.
| #define DECIMAL32_Ehigh (DECIMAL32_Emax+DECIMAL32_Bias-DECIMAL32_Pmax+1) |
| #define DECIMAL32_Emax 96 |
| #define DECIMAL32_Emin -95 |
| #define DECIMAL32_Pmax 7 |
Definition at line 39 of file decimal32.h.
Referenced by decimal32FromNumber(), and decimal32ToNumber().
| #define DECIMAL32_String 15 |
Definition at line 43 of file decimal32.h.
Definition at line 74 of file decimal32.h.
| #define decimal32ExpCon | ( | d | ) |
| #define decimal32SetExpCon | ( | d, | |||
| e | ) |
| #define DECIMAL_Inf 0x78 |
Definition at line 65 of file decimal32.h.
| #define DECIMAL_NaN 0x7c |
Definition at line 63 of file decimal32.h.
| #define DECIMAL_sNaN 0x7e |
Definition at line 64 of file decimal32.h.
| #define DECNUMDIGITS DECIMAL32_Pmax |
Definition at line 48 of file decimal32.h.
| decimal32* decimal32FromNumber | ( | decimal32 * | , | |
| const decNumber * | , | |||
| decContext * | ||||
| ) |
Definition at line 76 of file decimal32.c.
References decNumber::bits, decimal32::bytes, DEC_Clamped, DEC_clear, DEC_INIT_DECIMAL32, decContextDefault(), decContextSetStatus(), decDensePackCoeff(), DECIMAL32_Bias, DECIMAL32_Ehigh, DECIMAL32_Emax, DECIMAL32_Emin, DECIMAL32_Pmax, decimal32SetExpCon, decimal32SetSign, DECIMAL_Inf, DECIMAL_NaN, DECIMAL_sNaN, DECINF, DECNAN, DECNEG, decNumberIsZero, decNumberPlus(), DECSPECIAL, decNumber::digits, exp, decNumber::exponent, Int, decNumber::lsu, decContext::round, decContext::status, top, uByte, uInt, and unsigned.
Referenced by decimal32FromString(), decimal_round_for_format(), and encode_decimal32().
| decimal32* decimal32FromString | ( | decimal32 * | , | |
| const char * | , | |||
| decContext * | ||||
| ) |
Definition at line 300 of file decimal32.c.
References DEC_INIT_DECIMAL32, decContextDefault(), decContextSetStatus(), decimal32FromNumber(), decNumberFromString(), decContext::round, and decContext::status.
| char* decimal32ToEngString | ( | const decimal32 * | , | |
| char * | ||||
| ) |
Definition at line 276 of file decimal32.c.
References decimal32ToNumber(), and decNumberToEngString().
Definition at line 193 of file decimal32.c.
References decNumber::bits, decimal32::bytes, decDenseUnpackCoeff(), DECIMAL32_Bias, DECIMAL32_Pmax, decimal32ExpCon, decimal32Sign, DECIMAL_Inf, DECIMAL_NaN, DECINF, DECNAN, DECNEG, decNumberZero(), DECSNAN, exp, decNumber::exponent, Int, top, and uInt.
Referenced by decimal32ToEngString(), decimal32ToString(), decimal_round_for_format(), decode_decimal32(), and isinfd32().
| char* decimal32ToString | ( | const decimal32 * | , | |
| char * | ||||
| ) |
Definition at line 267 of file decimal32.c.
References decimal32ToNumber(), and decNumberToString().
1.5.6