1967
|
1 /* |
|
2 |
2847
|
3 Copyright (C) 1996, 1997 John W. Eaton |
1967
|
4 |
|
5 This file is part of Octave. |
|
6 |
|
7 Octave is free software; you can redistribute it and/or modify it |
|
8 under the terms of the GNU General Public License as published by the |
|
9 Free Software Foundation; either version 2, or (at your option) any |
|
10 later version. |
|
11 |
|
12 Octave is distributed in the hope that it will be useful, but WITHOUT |
|
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
15 for more details. |
|
16 |
|
17 You should have received a copy of the GNU General Public License |
|
18 along with Octave; see the file COPYING. If not, write to the Free |
5307
|
19 Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA |
|
20 02110-1301, USA. |
1967
|
21 |
|
22 */ |
|
23 |
|
24 #if !defined (octave_liboctave_ieee_h) |
|
25 #define octave_liboctave_ieee_h 1 |
|
26 |
4072
|
27 #ifdef __cplusplus |
|
28 extern "C" { |
|
29 #endif |
|
30 |
4102
|
31 /* Octave's idea of infinity. */ |
|
32 extern double octave_Inf; |
|
33 |
|
34 /* Octave's idea of a missing value. */ |
|
35 extern double octave_NA; |
|
36 |
|
37 /* Octave's idea of not a number. */ |
|
38 extern double octave_NaN; |
|
39 |
5388
|
40 /* XXX FIXME XXX -- this code assumes that a double has twice the |
|
41 number of bits as an int */ |
|
42 |
4075
|
43 extern int lo_ieee_hw; |
|
44 extern int lo_ieee_lw; |
|
45 |
|
46 typedef union |
|
47 { |
|
48 double value; |
|
49 unsigned int word[2]; |
|
50 } lo_ieee_double; |
|
51 |
|
52 #define LO_IEEE_NA_HW 0x7ff00000 |
|
53 #define LO_IEEE_NA_LW 1954 |
|
54 |
4074
|
55 extern void octave_ieee_init (void); |
1967
|
56 |
2522
|
57 #if defined (SCO) |
4074
|
58 extern int isnan (double); |
|
59 extern int isinf (double); |
4072
|
60 #endif |
|
61 |
4074
|
62 extern int lo_ieee_isnan (double x); |
|
63 extern int lo_ieee_finite (double x); |
|
64 extern int lo_ieee_isinf (double x); |
4072
|
65 |
4075
|
66 extern int lo_ieee_is_NA (double); |
5389
|
67 extern int lo_ieee_is_NaN_or_NA (double) GCC_ATTR_DEPRECATED; |
4075
|
68 |
4102
|
69 extern double lo_ieee_inf_value (void); |
|
70 extern double lo_ieee_na_value (void); |
|
71 extern double lo_ieee_nan_value (void); |
|
72 |
5098
|
73 extern int lo_ieee_signbit (double); |
4349
|
74 |
4072
|
75 #ifdef __cplusplus |
|
76 } |
2522
|
77 #endif |
|
78 |
1967
|
79 #endif |
|
80 |
|
81 /* |
|
82 ;;; Local Variables: *** |
|
83 ;;; mode: C++ *** |
|
84 ;;; End: *** |
|
85 */ |