Mercurial > hg > octave-lyh
comparison liboctave/lo-ieee.cc @ 3475:6293a9d5650a
[project @ 2000-01-25 21:23:07 by jwe]
author | jwe |
---|---|
date | Tue, 25 Jan 2000 21:23:09 +0000 |
parents | fdc7dd08cd85 |
children | cfb762dc9259 |
comparison
equal
deleted
inserted
replaced
3474:9c68cfa263eb | 3475:6293a9d5650a |
---|---|
33 | 33 |
34 #if defined (HAVE_IEEEFP_H) | 34 #if defined (HAVE_IEEEFP_H) |
35 #include <ieeefp.h> | 35 #include <ieeefp.h> |
36 #endif | 36 #endif |
37 | 37 |
38 #if defined (HAVE_SUNMATH_H) | |
39 #include <sunmath.h> | |
40 #endif | |
41 | |
42 #if defined (HAVE_NAN_H) | 38 #if defined (HAVE_NAN_H) |
43 #if defined (SCO) | 39 #if defined (SCO) |
44 #define _IEEE 1 | 40 #define _IEEE 1 |
45 #endif | 41 #endif |
46 #include <nan.h> | 42 #include <nan.h> |
69 double tmp = 1.0; | 65 double tmp = 1.0; |
70 octave_Inf = 1.0 / (tmp - tmp); | 66 octave_Inf = 1.0 / (tmp - tmp); |
71 #elif defined (__alpha__) && ! defined (linux) | 67 #elif defined (__alpha__) && ! defined (linux) |
72 extern unsigned int DINFINITY[2]; | 68 extern unsigned int DINFINITY[2]; |
73 octave_Inf = (*(X_CAST(double *, DINFINITY))); | 69 octave_Inf = (*(X_CAST(double *, DINFINITY))); |
74 #elif defined (HAVE_INFINITY) | |
75 octave_Inf = infinity (); | |
76 #else | 70 #else |
77 double tmp = 1e+10; | 71 double tmp = 1e+10; |
78 octave_Inf = tmp; | 72 octave_Inf = tmp; |
79 for (;;) | 73 for (;;) |
80 { | 74 { |
90 #if defined (HAVE_ISNAN) | 84 #if defined (HAVE_ISNAN) |
91 | 85 |
92 #if defined (__alpha__) && ! defined (linux) | 86 #if defined (__alpha__) && ! defined (linux) |
93 extern unsigned int DQNAN[2]; | 87 extern unsigned int DQNAN[2]; |
94 octave_NaN = (*(X_CAST(double *, DQNAN))); | 88 octave_NaN = (*(X_CAST(double *, DQNAN))); |
95 #elif defined (HAVE_QUIET_NAN) | |
96 octave_NaN = quiet_nan (0L); | |
97 #else | 89 #else |
98 octave_NaN = octave_Inf / octave_Inf; | 90 octave_NaN = octave_Inf / octave_Inf; |
99 #endif | 91 #endif |
100 | 92 |
101 #endif | 93 #endif |