1 /* Copyright (C) 1992, 1995, 1996, 1998 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library; if not, write to the Free
16 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
32 /* This is the IEEE 754 single-precision format. */
35 unsigned int mantissa
:23;
36 unsigned int exponent
:8;
37 unsigned int negative
:1;
40 /* This format makes it easier to see if a NaN is a signalling NaN. */
43 unsigned int mantissa
:22;
44 unsigned int quiet_nan
:1;
45 unsigned int exponent
:8;
46 unsigned int negative
:1;
50 #define IEEE754_FLOAT_BIAS 0x7f /* Added to exponent. */
57 /* This is the IEEE 754 double-precision format. */
60 unsigned int mantissa0
:20;
61 unsigned int exponent
:11;
62 unsigned int negative
:1;
63 unsigned int mantissa1
:32;
66 /* This format makes it easier to see if a NaN is a signalling NaN. */
69 unsigned int mantissa0
:19;
70 unsigned int quiet_nan
:1;
71 unsigned int exponent
:11;
72 unsigned int negative
:1;
73 unsigned int mantissa1
:32;
77 #define IEEE754_DOUBLE_BIAS 0x3ff /* Added to exponent. */
80 /* The following two structures are correct for `new' floating point systems but
81 wrong for the old FPPC. The only solution seems to be to avoid their use on
84 union ieee854_long_double
88 /* This is the IEEE 854 double-extended-precision format. */
91 unsigned int exponent
:15;
92 unsigned int empty
:16;
93 unsigned int negative
:1;
94 unsigned int mantissa1
:32;
95 unsigned int mantissa0
:32;
98 /* This is for NaNs in the IEEE 854 double-extended-precision format. */
101 unsigned int exponent
:15;
102 unsigned int empty
:16;
103 unsigned int negative
:1;
104 unsigned int mantissa1
:32;
105 unsigned int mantissa0
:30;
106 unsigned int quiet_nan
:1;
111 #define IEEE854_LONG_DOUBLE_BIAS 0x3fff
115 #endif /* ieee754.h */