diff options
author | DJ Delorie <dj@redhat.com> | 2009-03-30 00:01:29 +0000 |
---|---|---|
committer | DJ Delorie <dj@redhat.com> | 2009-03-30 00:01:29 +0000 |
commit | f2be950300e01d47ae4f41fb7481c26319d33d81 (patch) | |
tree | b8e1601a34c5f16ac401608e1a85a3091254543a /libdecnumber/decDouble.h | |
parent | 4104b747d5a0457c0dd5236796c6b8efafa70bd0 (diff) | |
download | gdb-f2be950300e01d47ae4f41fb7481c26319d33d81.zip gdb-f2be950300e01d47ae4f41fb7481c26319d33d81.tar.gz gdb-f2be950300e01d47ae4f41fb7481c26319d33d81.tar.bz2 |
merge from gcc
Diffstat (limited to 'libdecnumber/decDouble.h')
-rw-r--r-- | libdecnumber/decDouble.h | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/libdecnumber/decDouble.h b/libdecnumber/decDouble.h index aa8d77d..53fcf40 100644 --- a/libdecnumber/decDouble.h +++ b/libdecnumber/decDouble.h @@ -31,22 +31,24 @@ /* ------------------------------------------------------------------ */ /* decDouble.h -- Decimal 64-bit format module header */ /* ------------------------------------------------------------------ */ +/* Please see decFloats.h for an overview and documentation details. */ +/* ------------------------------------------------------------------ */ #if !defined(DECDOUBLE) #define DECDOUBLE - #define DECDOUBLENAME "decimalDouble" /* Short name */ + #define DECDOUBLENAME "decimalDouble" /* Short name */ #define DECDOUBLETITLE "Decimal 64-bit datum" /* Verbose name */ #define DECDOUBLEAUTHOR "Mike Cowlishaw" /* Who to blame */ /* parameters for decDoubles */ #define DECDOUBLE_Bytes 8 /* length */ #define DECDOUBLE_Pmax 16 /* maximum precision (digits) */ - #define DECDOUBLE_Emin -383 /* minimum adjusted exponent */ - #define DECDOUBLE_Emax 384 /* maximum adjusted exponent */ + #define DECDOUBLE_Emin -383 /* minimum adjusted exponent */ + #define DECDOUBLE_Emax 384 /* maximum adjusted exponent */ #define DECDOUBLE_EmaxD 3 /* maximum exponent digits */ - #define DECDOUBLE_Bias 398 /* bias for the exponent */ - #define DECDOUBLE_String 25 /* maximum string length, +1 */ + #define DECDOUBLE_Bias 398 /* bias for the exponent */ + #define DECDOUBLE_String 25 /* maximum string length, +1 */ #define DECDOUBLE_EconL 8 /* exponent continuation length */ #define DECDOUBLE_Declets 5 /* count of declets */ /* highest biased exponent (Elimit-1) */ @@ -56,14 +58,11 @@ #include "decContext.h" #include "decQuad.h" - /* The decDouble decimal 64-bit type, accessible by all sizes */ + /* The decDouble decimal 64-bit type, accessible by various types */ typedef union { - uint8_t bytes[DECDOUBLE_Bytes]; /* fields: 1, 5, 8, 50 bits */ + uint8_t bytes[DECDOUBLE_Bytes]; /* fields: 1, 5, 8, 50 bits */ uint16_t shorts[DECDOUBLE_Bytes/2]; - uint32_t words[DECDOUBLE_Bytes/4]; - #if DECUSE64 - uint64_t longs[DECDOUBLE_Bytes/8]; - #endif + uint32_t words[DECDOUBLE_Bytes/4]; } decDouble; /* ---------------------------------------------------------------- */ @@ -76,7 +75,6 @@ extern decDouble * decDoubleFromBCD(decDouble *, int32_t, const uint8_t *, int32_t); extern decDouble * decDoubleFromInt32(decDouble *, int32_t); extern decDouble * decDoubleFromPacked(decDouble *, int32_t, const uint8_t *); - extern decDouble * decDoubleFromPackedChecked(decDouble *, int32_t, const uint8_t *); extern decDouble * decDoubleFromString(decDouble *, const char *, decContext *); extern decDouble * decDoubleFromUInt32(decDouble *, uint32_t); extern decDouble * decDoubleFromWider(decDouble *, const decQuad *, decContext *); @@ -162,8 +160,7 @@ /* decNumber conversions; these are implemented as macros so as not */ /* to force a dependency on decimal64 and decNumber in decDouble. */ - /* decDoubleFromNumber returns a decimal64 * to avoid warnings. */ #define decDoubleToNumber(dq, dn) decimal64ToNumber((decimal64 *)(dq), dn) - #define decDoubleFromNumber(dq, dn, set) decimal64FromNumber((decimal64 *)(dq), dn, set) + #define decDoubleFromNumber(dq, dn, set) (decDouble *)decimal64FromNumber((decimal64 *)(dq), dn, set) #endif |