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 |
4075
|
40 extern int lo_ieee_hw; |
|
41 extern int lo_ieee_lw; |
|
42 |
|
43 typedef union |
|
44 { |
|
45 double value; |
|
46 unsigned int word[2]; |
|
47 } lo_ieee_double; |
|
48 |
|
49 #define LO_IEEE_NA_HW 0x7ff00000 |
|
50 #define LO_IEEE_NA_LW 1954 |
|
51 |
4074
|
52 extern void octave_ieee_init (void); |
1967
|
53 |
2522
|
54 #if defined (SCO) |
4074
|
55 extern int isnan (double); |
|
56 extern int isinf (double); |
4072
|
57 #endif |
|
58 |
4074
|
59 extern int lo_ieee_isnan (double x); |
|
60 extern int lo_ieee_finite (double x); |
|
61 extern int lo_ieee_isinf (double x); |
4072
|
62 |
4075
|
63 extern int lo_ieee_is_NA (double); |
|
64 extern int lo_ieee_is_NaN_or_NA (double); |
|
65 |
4102
|
66 extern double lo_ieee_inf_value (void); |
|
67 extern double lo_ieee_na_value (void); |
|
68 extern double lo_ieee_nan_value (void); |
|
69 |
5098
|
70 extern int lo_ieee_signbit (double); |
4349
|
71 |
4072
|
72 #ifdef __cplusplus |
|
73 } |
2522
|
74 #endif |
|
75 |
1967
|
76 #endif |
|
77 |
|
78 /* |
|
79 ;;; Local Variables: *** |
|
80 ;;; mode: C++ *** |
|
81 ;;; End: *** |
|
82 */ |