comparison liboctave/util/lo-ieee.h @ 31608:23664317f0d3

maint: merge stable to default
author Rik <rik@octave.org>
date Thu, 01 Dec 2022 20:05:44 -0800
parents dfa5d9c3ae72 aac27ad79be6
children 5f11de0e7440
comparison
equal deleted inserted replaced
31606:dfa5d9c3ae72 31608:23664317f0d3
123 123
124 #if defined (__cplusplus) 124 #if defined (__cplusplus)
125 125
126 OCTAVE_BEGIN_NAMESPACE(octave) 126 OCTAVE_BEGIN_NAMESPACE(octave)
127 127
128 template <typename T> 128 template <typename T>
129 struct numeric_limits 129 struct numeric_limits
130 { 130 {
131 public: 131 public:
132 static T NA (void) { return static_cast<T> (0); } 132 static T NA (void) { return static_cast<T> (0); }
133 static T NaN (void) { return static_cast<T> (0); } 133 static T NaN (void) { return static_cast<T> (0); }
134 static T Inf (void) { return static_cast<T> (0); } 134 static T Inf (void) { return static_cast<T> (0); }
135 }; 135 };
136 136
137 template <> 137 template <>
138 struct numeric_limits<double> 138 struct numeric_limits<double>
139 { 139 {
140 public: 140 public:
141 static double NA (void) { return octave_NA; } 141 static double NA (void) { return octave_NA; }
142 static double NaN (void) { return octave_NaN; } 142 static double NaN (void) { return octave_NaN; }
143 static double Inf (void) { return octave_Inf; } 143 static double Inf (void) { return octave_Inf; }
144 }; 144 };
145 145
146 template <> 146 template <>
147 struct numeric_limits<float> 147 struct numeric_limits<float>
148 { 148 {
149 public: 149 public:
150 static float NA (void) { return octave_Float_NA; } 150 static float NA (void) { return octave_Float_NA; }
151 static float NaN (void) { return octave_Float_NaN; } 151 static float NaN (void) { return octave_Float_NaN; }
152 static float Inf (void) { return octave_Float_Inf; } 152 static float Inf (void) { return octave_Float_Inf; }
153 }; 153 };
154 154
155 OCTAVE_END_NAMESPACE(octave) 155 OCTAVE_END_NAMESPACE(octave)
156 156
157 #endif 157 #endif
158 158