diff options
author | Andrew Cagney <cagney@gnu.org> | 2003-09-15 21:28:56 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@gnu.org> | 2003-09-15 21:28:56 +0000 |
commit | a9993197f2d23aeb89a9546a5051addd37e1563c (patch) | |
tree | 6f26fec084e8f13620eb665265896079dc9afa8b | |
parent | 80a45e340c1984bac3b1af76e384326aa956aa99 (diff) | |
download | newlib-a9993197f2d23aeb89a9546a5051addd37e1563c.zip newlib-a9993197f2d23aeb89a9546a5051addd37e1563c.tar.gz newlib-a9993197f2d23aeb89a9546a5051addd37e1563c.tar.bz2 |
2003-09-15 Andrew Cagney <cagney@redhat.com>
* floatformat.h (struct floatformat): Make "exp_bias" signed.
-rw-r--r-- | include/ChangeLog | 4 | ||||
-rw-r--r-- | include/floatformat.h | 8 |
2 files changed, 10 insertions, 2 deletions
diff --git a/include/ChangeLog b/include/ChangeLog index b23b527..a39d786 100644 --- a/include/ChangeLog +++ b/include/ChangeLog @@ -1,3 +1,7 @@ +2003-09-15 Andrew Cagney <cagney@redhat.com> + + * floatformat.h (struct floatformat): Make "exp_bias" signed. + 2003-09-15 Daniel Jacobowitz <drow@mvista.com> * floatformat.h (floatformat_is_valid): Add prototype. diff --git a/include/floatformat.h b/include/floatformat.h index feb3260..1d08fd6 100644 --- a/include/floatformat.h +++ b/include/floatformat.h @@ -61,8 +61,12 @@ struct floatformat unsigned int exp_start; unsigned int exp_len; - /* Amount added to "true" exponent. 0x3fff for many IEEE extendeds. */ - unsigned int exp_bias; + /* Bias added to a "true" exponent to form the biased exponent. It + is intentionally signed as, otherwize, -exp_bias can turn into a + very large number (e.g., given the exp_bias of 0x3fff and a 64 + bit long, the equation (long)(1 - exp_bias) evaluates to + 4294950914) instead of -16382). */ + int exp_bias; /* Exponent value which indicates NaN. This is the actual value stored in the float, not adjusted by the exp_bias. This usually consists of all one bits. */ |