1 | /* Native implementation of soft float functions */
|
---|
2 | #define __C99FEATURES__
|
---|
3 | #include <math.h>
|
---|
4 |
|
---|
5 | #if (defined(CONFIG_BSD) && !defined(__APPLE__) && !defined(__GLIBC__) && !defined(__FreeBSD__)) \
|
---|
6 | || defined(CONFIG_SOLARIS) /* VBox: Added __FreeBSD__ */
|
---|
7 | #include <ieeefp.h>
|
---|
8 | #define fabsf(f) ((float)fabs(f))
|
---|
9 | #else
|
---|
10 | #include <fenv.h>
|
---|
11 | #endif
|
---|
12 |
|
---|
13 | #if defined(__OpenBSD__) || defined(__NetBSD__)
|
---|
14 | #include <sys/param.h>
|
---|
15 | #endif
|
---|
16 |
|
---|
17 | /*
|
---|
18 | * Define some C99-7.12.3 classification macros and
|
---|
19 | * some C99-.12.4 for Solaris systems OS less than 10,
|
---|
20 | * or Solaris 10 systems running GCC 3.x or less.
|
---|
21 | * Solaris 10 with GCC4 does not need these macros as they
|
---|
22 | * are defined in <iso/math_c99.h> with a compiler directive
|
---|
23 | */
|
---|
24 | #if defined(CONFIG_SOLARIS) && \
|
---|
25 | ((CONFIG_SOLARIS_VERSION <= 9 ) || \
|
---|
26 | ((CONFIG_SOLARIS_VERSION == 10) && (__GNUC__ < 4))) \
|
---|
27 | || (defined(__OpenBSD__) && (OpenBSD < 200811))
|
---|
28 | /*
|
---|
29 | * C99 7.12.3 classification macros
|
---|
30 | * and
|
---|
31 | * C99 7.12.14 comparison macros
|
---|
32 | *
|
---|
33 | * ... do not work on Solaris 10 using GNU CC 3.4.x.
|
---|
34 | * Try to workaround the missing / broken C99 math macros.
|
---|
35 | */
|
---|
36 | #if defined(__OpenBSD__)
|
---|
37 | #define unordered(x, y) (isnan(x) || isnan(y))
|
---|
38 | #endif
|
---|
39 |
|
---|
40 | #ifdef __NetBSD__
|
---|
41 | #ifndef isgreater
|
---|
42 | #define isgreater(x, y) __builtin_isgreater(x, y)
|
---|
43 | #endif
|
---|
44 | #ifndef isgreaterequal
|
---|
45 | #define isgreaterequal(x, y) __builtin_isgreaterequal(x, y)
|
---|
46 | #endif
|
---|
47 | #ifndef isless
|
---|
48 | #define isless(x, y) __builtin_isless(x, y)
|
---|
49 | #endif
|
---|
50 | #ifndef islessequal
|
---|
51 | #define islessequal(x, y) __builtin_islessequal(x, y)
|
---|
52 | #endif
|
---|
53 | #ifndef isunordered
|
---|
54 | #define isunordered(x, y) __builtin_isunordered(x, y)
|
---|
55 | #endif
|
---|
56 | #endif
|
---|
57 |
|
---|
58 |
|
---|
59 | #define isnormal(x) (fpclass(x) >= FP_NZERO)
|
---|
60 | #define isgreater(x, y) ((!unordered(x, y)) && ((x) > (y)))
|
---|
61 | #define isgreaterequal(x, y) ((!unordered(x, y)) && ((x) >= (y)))
|
---|
62 | #define isless(x, y) ((!unordered(x, y)) && ((x) < (y)))
|
---|
63 | #define islessequal(x, y) ((!unordered(x, y)) && ((x) <= (y)))
|
---|
64 | #define isunordered(x,y) unordered(x, y)
|
---|
65 | #endif
|
---|
66 |
|
---|
67 | #if defined(__sun__) && !defined(CONFIG_NEEDS_LIBSUNMATH)
|
---|
68 |
|
---|
69 | #ifndef isnan
|
---|
70 | # define isnan(x) \
|
---|
71 | (sizeof (x) == sizeof (long double) ? isnan_ld (x) \
|
---|
72 | : sizeof (x) == sizeof (double) ? isnan_d (x) \
|
---|
73 | : isnan_f (x))
|
---|
74 | static inline int isnan_f (float x) { return x != x; }
|
---|
75 | static inline int isnan_d (double x) { return x != x; }
|
---|
76 | static inline int isnan_ld (long double x) { return x != x; }
|
---|
77 | #endif
|
---|
78 |
|
---|
79 | #ifndef isinf
|
---|
80 | # define isinf(x) \
|
---|
81 | (sizeof (x) == sizeof (long double) ? isinf_ld (x) \
|
---|
82 | : sizeof (x) == sizeof (double) ? isinf_d (x) \
|
---|
83 | : isinf_f (x))
|
---|
84 | static inline int isinf_f (float x) { return isnan (x - x); }
|
---|
85 | static inline int isinf_d (double x) { return isnan (x - x); }
|
---|
86 | static inline int isinf_ld (long double x) { return isnan (x - x); }
|
---|
87 | #endif
|
---|
88 | #endif
|
---|
89 |
|
---|
90 | typedef float float32;
|
---|
91 | typedef double float64;
|
---|
92 | #ifdef FLOATX80
|
---|
93 | typedef long double floatx80;
|
---|
94 | #endif
|
---|
95 |
|
---|
96 | typedef union {
|
---|
97 | float32 f;
|
---|
98 | uint32_t i;
|
---|
99 | } float32u;
|
---|
100 | typedef union {
|
---|
101 | float64 f;
|
---|
102 | uint64_t i;
|
---|
103 | } float64u;
|
---|
104 | #ifdef FLOATX80
|
---|
105 | typedef union {
|
---|
106 | floatx80 f;
|
---|
107 | struct {
|
---|
108 | uint64_t low;
|
---|
109 | uint16_t high;
|
---|
110 | } i;
|
---|
111 | } floatx80u;
|
---|
112 | #endif
|
---|
113 |
|
---|
114 | /*----------------------------------------------------------------------------
|
---|
115 | | Software IEC/IEEE floating-point rounding mode.
|
---|
116 | *----------------------------------------------------------------------------*/
|
---|
117 | #if (defined(CONFIG_BSD) && !defined(__APPLE__) && !defined(__GLIBC__)) \
|
---|
118 | || defined(CONFIG_SOLARIS)
|
---|
119 | #if defined(__OpenBSD__)
|
---|
120 | #define FE_RM FP_RM
|
---|
121 | #define FE_RP FP_RP
|
---|
122 | #define FE_RZ FP_RZ
|
---|
123 | #endif
|
---|
124 | enum {
|
---|
125 | float_round_nearest_even = FP_RN,
|
---|
126 | float_round_down = FP_RM,
|
---|
127 | float_round_up = FP_RP,
|
---|
128 | float_round_to_zero = FP_RZ
|
---|
129 | };
|
---|
130 | #else
|
---|
131 | enum {
|
---|
132 | float_round_nearest_even = FE_TONEAREST,
|
---|
133 | float_round_down = FE_DOWNWARD,
|
---|
134 | float_round_up = FE_UPWARD,
|
---|
135 | float_round_to_zero = FE_TOWARDZERO
|
---|
136 | };
|
---|
137 | #endif
|
---|
138 |
|
---|
139 | typedef struct float_status {
|
---|
140 | int float_rounding_mode;
|
---|
141 | #ifdef FLOATX80
|
---|
142 | int floatx80_rounding_precision;
|
---|
143 | #endif
|
---|
144 | } float_status;
|
---|
145 |
|
---|
146 | void set_float_rounding_mode(int val STATUS_PARAM);
|
---|
147 | #ifdef FLOATX80
|
---|
148 | void set_floatx80_rounding_precision(int val STATUS_PARAM);
|
---|
149 | #endif
|
---|
150 |
|
---|
151 | /*----------------------------------------------------------------------------
|
---|
152 | | Software IEC/IEEE integer-to-floating-point conversion routines.
|
---|
153 | *----------------------------------------------------------------------------*/
|
---|
154 | float32 int32_to_float32( int STATUS_PARAM);
|
---|
155 | float32 uint32_to_float32( unsigned int STATUS_PARAM);
|
---|
156 | float64 int32_to_float64( int STATUS_PARAM);
|
---|
157 | float64 uint32_to_float64( unsigned int STATUS_PARAM);
|
---|
158 | #ifdef FLOATX80
|
---|
159 | floatx80 int32_to_floatx80( int STATUS_PARAM);
|
---|
160 | #endif
|
---|
161 | #ifdef FLOAT128
|
---|
162 | float128 int32_to_float128( int STATUS_PARAM);
|
---|
163 | #endif
|
---|
164 | float32 int64_to_float32( int64_t STATUS_PARAM);
|
---|
165 | float32 uint64_to_float32( uint64_t STATUS_PARAM);
|
---|
166 | float64 int64_to_float64( int64_t STATUS_PARAM);
|
---|
167 | float64 uint64_to_float64( uint64_t v STATUS_PARAM);
|
---|
168 | #ifdef FLOATX80
|
---|
169 | floatx80 int64_to_floatx80( int64_t STATUS_PARAM);
|
---|
170 | #endif
|
---|
171 | #ifdef FLOAT128
|
---|
172 | float128 int64_to_float128( int64_t STATUS_PARAM);
|
---|
173 | #endif
|
---|
174 |
|
---|
175 | /*----------------------------------------------------------------------------
|
---|
176 | | Software IEC/IEEE single-precision conversion routines.
|
---|
177 | *----------------------------------------------------------------------------*/
|
---|
178 | int float32_to_int32( float32 STATUS_PARAM);
|
---|
179 | int float32_to_int32_round_to_zero( float32 STATUS_PARAM);
|
---|
180 | unsigned int float32_to_uint32( float32 a STATUS_PARAM);
|
---|
181 | unsigned int float32_to_uint32_round_to_zero( float32 a STATUS_PARAM);
|
---|
182 | int64_t float32_to_int64( float32 STATUS_PARAM);
|
---|
183 | int64_t float32_to_int64_round_to_zero( float32 STATUS_PARAM);
|
---|
184 | float64 float32_to_float64( float32 STATUS_PARAM);
|
---|
185 | #ifdef FLOATX80
|
---|
186 | floatx80 float32_to_floatx80( float32 STATUS_PARAM);
|
---|
187 | #endif
|
---|
188 | #ifdef FLOAT128
|
---|
189 | float128 float32_to_float128( float32 STATUS_PARAM);
|
---|
190 | #endif
|
---|
191 |
|
---|
192 | /*----------------------------------------------------------------------------
|
---|
193 | | Software IEC/IEEE single-precision operations.
|
---|
194 | *----------------------------------------------------------------------------*/
|
---|
195 | float32 float32_round_to_int( float32 STATUS_PARAM);
|
---|
196 | INLINE float32 float32_add( float32 a, float32 b STATUS_PARAM)
|
---|
197 | {
|
---|
198 | return a + b;
|
---|
199 | }
|
---|
200 | INLINE float32 float32_sub( float32 a, float32 b STATUS_PARAM)
|
---|
201 | {
|
---|
202 | return a - b;
|
---|
203 | }
|
---|
204 | INLINE float32 float32_mul( float32 a, float32 b STATUS_PARAM)
|
---|
205 | {
|
---|
206 | return a * b;
|
---|
207 | }
|
---|
208 | INLINE float32 float32_div( float32 a, float32 b STATUS_PARAM)
|
---|
209 | {
|
---|
210 | return a / b;
|
---|
211 | }
|
---|
212 | float32 float32_rem( float32, float32 STATUS_PARAM);
|
---|
213 | float32 float32_sqrt( float32 STATUS_PARAM);
|
---|
214 | INLINE int float32_eq( float32 a, float32 b STATUS_PARAM)
|
---|
215 | {
|
---|
216 | return a == b;
|
---|
217 | }
|
---|
218 | INLINE int float32_le( float32 a, float32 b STATUS_PARAM)
|
---|
219 | {
|
---|
220 | return a <= b;
|
---|
221 | }
|
---|
222 | INLINE int float32_lt( float32 a, float32 b STATUS_PARAM)
|
---|
223 | {
|
---|
224 | return a < b;
|
---|
225 | }
|
---|
226 | INLINE int float32_eq_signaling( float32 a, float32 b STATUS_PARAM)
|
---|
227 | {
|
---|
228 | return a <= b && a >= b;
|
---|
229 | }
|
---|
230 | INLINE int float32_le_quiet( float32 a, float32 b STATUS_PARAM)
|
---|
231 | {
|
---|
232 | return islessequal(a, b);
|
---|
233 | }
|
---|
234 | INLINE int float32_lt_quiet( float32 a, float32 b STATUS_PARAM)
|
---|
235 | {
|
---|
236 | return isless(a, b);
|
---|
237 | }
|
---|
238 | INLINE int float32_unordered( float32 a, float32 b STATUS_PARAM)
|
---|
239 | {
|
---|
240 | return isunordered(a, b);
|
---|
241 |
|
---|
242 | }
|
---|
243 | int float32_compare( float32, float32 STATUS_PARAM );
|
---|
244 | int float32_compare_quiet( float32, float32 STATUS_PARAM );
|
---|
245 | int float32_is_signaling_nan( float32 );
|
---|
246 | int float32_is_nan( float32 );
|
---|
247 |
|
---|
248 | INLINE float32 float32_abs(float32 a)
|
---|
249 | {
|
---|
250 | return fabsf(a);
|
---|
251 | }
|
---|
252 |
|
---|
253 | INLINE float32 float32_chs(float32 a)
|
---|
254 | {
|
---|
255 | return -a;
|
---|
256 | }
|
---|
257 |
|
---|
258 | INLINE float32 float32_is_infinity(float32 a)
|
---|
259 | {
|
---|
260 | return fpclassify(a) == FP_INFINITE;
|
---|
261 | }
|
---|
262 |
|
---|
263 | INLINE float32 float32_is_neg(float32 a)
|
---|
264 | {
|
---|
265 | float32u u;
|
---|
266 | u.f = a;
|
---|
267 | return u.i >> 31;
|
---|
268 | }
|
---|
269 |
|
---|
270 | INLINE float32 float32_is_zero(float32 a)
|
---|
271 | {
|
---|
272 | return fpclassify(a) == FP_ZERO;
|
---|
273 | }
|
---|
274 |
|
---|
275 | INLINE float32 float32_scalbn(float32 a, int n)
|
---|
276 | {
|
---|
277 | return scalbnf(a, n);
|
---|
278 | }
|
---|
279 |
|
---|
280 | /*----------------------------------------------------------------------------
|
---|
281 | | Software IEC/IEEE double-precision conversion routines.
|
---|
282 | *----------------------------------------------------------------------------*/
|
---|
283 | int float64_to_int32( float64 STATUS_PARAM );
|
---|
284 | int float64_to_int32_round_to_zero( float64 STATUS_PARAM );
|
---|
285 | unsigned int float64_to_uint32( float64 STATUS_PARAM );
|
---|
286 | unsigned int float64_to_uint32_round_to_zero( float64 STATUS_PARAM );
|
---|
287 | int64_t float64_to_int64( float64 STATUS_PARAM );
|
---|
288 | int64_t float64_to_int64_round_to_zero( float64 STATUS_PARAM );
|
---|
289 | uint64_t float64_to_uint64( float64 STATUS_PARAM );
|
---|
290 | uint64_t float64_to_uint64_round_to_zero( float64 STATUS_PARAM );
|
---|
291 | float32 float64_to_float32( float64 STATUS_PARAM );
|
---|
292 | #ifdef FLOATX80
|
---|
293 | floatx80 float64_to_floatx80( float64 STATUS_PARAM );
|
---|
294 | #endif
|
---|
295 | #ifdef FLOAT128
|
---|
296 | float128 float64_to_float128( float64 STATUS_PARAM );
|
---|
297 | #endif
|
---|
298 |
|
---|
299 | /*----------------------------------------------------------------------------
|
---|
300 | | Software IEC/IEEE double-precision operations.
|
---|
301 | *----------------------------------------------------------------------------*/
|
---|
302 | float64 float64_round_to_int( float64 STATUS_PARAM );
|
---|
303 | float64 float64_trunc_to_int( float64 STATUS_PARAM );
|
---|
304 | INLINE float64 float64_add( float64 a, float64 b STATUS_PARAM)
|
---|
305 | {
|
---|
306 | return a + b;
|
---|
307 | }
|
---|
308 | INLINE float64 float64_sub( float64 a, float64 b STATUS_PARAM)
|
---|
309 | {
|
---|
310 | return a - b;
|
---|
311 | }
|
---|
312 | INLINE float64 float64_mul( float64 a, float64 b STATUS_PARAM)
|
---|
313 | {
|
---|
314 | return a * b;
|
---|
315 | }
|
---|
316 | INLINE float64 float64_div( float64 a, float64 b STATUS_PARAM)
|
---|
317 | {
|
---|
318 | return a / b;
|
---|
319 | }
|
---|
320 | float64 float64_rem( float64, float64 STATUS_PARAM );
|
---|
321 | float64 float64_sqrt( float64 STATUS_PARAM );
|
---|
322 | INLINE int float64_eq( float64 a, float64 b STATUS_PARAM)
|
---|
323 | {
|
---|
324 | return a == b;
|
---|
325 | }
|
---|
326 | INLINE int float64_le( float64 a, float64 b STATUS_PARAM)
|
---|
327 | {
|
---|
328 | return a <= b;
|
---|
329 | }
|
---|
330 | INLINE int float64_lt( float64 a, float64 b STATUS_PARAM)
|
---|
331 | {
|
---|
332 | return a < b;
|
---|
333 | }
|
---|
334 | INLINE int float64_eq_signaling( float64 a, float64 b STATUS_PARAM)
|
---|
335 | {
|
---|
336 | return a <= b && a >= b;
|
---|
337 | }
|
---|
338 | INLINE int float64_le_quiet( float64 a, float64 b STATUS_PARAM)
|
---|
339 | {
|
---|
340 | return islessequal(a, b);
|
---|
341 | }
|
---|
342 | INLINE int float64_lt_quiet( float64 a, float64 b STATUS_PARAM)
|
---|
343 | {
|
---|
344 | return isless(a, b);
|
---|
345 |
|
---|
346 | }
|
---|
347 | INLINE int float64_unordered( float64 a, float64 b STATUS_PARAM)
|
---|
348 | {
|
---|
349 | return isunordered(a, b);
|
---|
350 |
|
---|
351 | }
|
---|
352 | int float64_compare( float64, float64 STATUS_PARAM );
|
---|
353 | int float64_compare_quiet( float64, float64 STATUS_PARAM );
|
---|
354 | int float64_is_signaling_nan( float64 );
|
---|
355 | int float64_is_nan( float64 );
|
---|
356 |
|
---|
357 | INLINE float64 float64_abs(float64 a)
|
---|
358 | {
|
---|
359 | return fabs(a);
|
---|
360 | }
|
---|
361 |
|
---|
362 | INLINE float64 float64_chs(float64 a)
|
---|
363 | {
|
---|
364 | return -a;
|
---|
365 | }
|
---|
366 |
|
---|
367 | INLINE float64 float64_is_infinity(float64 a)
|
---|
368 | {
|
---|
369 | return fpclassify(a) == FP_INFINITE;
|
---|
370 | }
|
---|
371 |
|
---|
372 | INLINE float64 float64_is_neg(float64 a)
|
---|
373 | {
|
---|
374 | float64u u;
|
---|
375 | u.f = a;
|
---|
376 | return u.i >> 63;
|
---|
377 | }
|
---|
378 |
|
---|
379 | INLINE float64 float64_is_zero(float64 a)
|
---|
380 | {
|
---|
381 | return fpclassify(a) == FP_ZERO;
|
---|
382 | }
|
---|
383 |
|
---|
384 | INLINE float64 float64_scalbn(float64 a, int n)
|
---|
385 | {
|
---|
386 | return scalbn(a, n);
|
---|
387 | }
|
---|
388 |
|
---|
389 | #ifdef FLOATX80
|
---|
390 |
|
---|
391 | /*----------------------------------------------------------------------------
|
---|
392 | | Software IEC/IEEE extended double-precision conversion routines.
|
---|
393 | *----------------------------------------------------------------------------*/
|
---|
394 | int floatx80_to_int32( floatx80 STATUS_PARAM );
|
---|
395 | int floatx80_to_int32_round_to_zero( floatx80 STATUS_PARAM );
|
---|
396 | int64_t floatx80_to_int64( floatx80 STATUS_PARAM);
|
---|
397 | int64_t floatx80_to_int64_round_to_zero( floatx80 STATUS_PARAM);
|
---|
398 | float32 floatx80_to_float32( floatx80 STATUS_PARAM );
|
---|
399 | float64 floatx80_to_float64( floatx80 STATUS_PARAM );
|
---|
400 | #ifdef FLOAT128
|
---|
401 | float128 floatx80_to_float128( floatx80 STATUS_PARAM );
|
---|
402 | #endif
|
---|
403 |
|
---|
404 | /*----------------------------------------------------------------------------
|
---|
405 | | Software IEC/IEEE extended double-precision operations.
|
---|
406 | *----------------------------------------------------------------------------*/
|
---|
407 | floatx80 floatx80_round_to_int( floatx80 STATUS_PARAM );
|
---|
408 | INLINE floatx80 floatx80_add( floatx80 a, floatx80 b STATUS_PARAM)
|
---|
409 | {
|
---|
410 | return a + b;
|
---|
411 | }
|
---|
412 | INLINE floatx80 floatx80_sub( floatx80 a, floatx80 b STATUS_PARAM)
|
---|
413 | {
|
---|
414 | return a - b;
|
---|
415 | }
|
---|
416 | INLINE floatx80 floatx80_mul( floatx80 a, floatx80 b STATUS_PARAM)
|
---|
417 | {
|
---|
418 | return a * b;
|
---|
419 | }
|
---|
420 | INLINE floatx80 floatx80_div( floatx80 a, floatx80 b STATUS_PARAM)
|
---|
421 | {
|
---|
422 | return a / b;
|
---|
423 | }
|
---|
424 | floatx80 floatx80_rem( floatx80, floatx80 STATUS_PARAM );
|
---|
425 | floatx80 floatx80_sqrt( floatx80 STATUS_PARAM );
|
---|
426 | INLINE int floatx80_eq( floatx80 a, floatx80 b STATUS_PARAM)
|
---|
427 | {
|
---|
428 | return a == b;
|
---|
429 | }
|
---|
430 | INLINE int floatx80_le( floatx80 a, floatx80 b STATUS_PARAM)
|
---|
431 | {
|
---|
432 | return a <= b;
|
---|
433 | }
|
---|
434 | INLINE int floatx80_lt( floatx80 a, floatx80 b STATUS_PARAM)
|
---|
435 | {
|
---|
436 | return a < b;
|
---|
437 | }
|
---|
438 | INLINE int floatx80_eq_signaling( floatx80 a, floatx80 b STATUS_PARAM)
|
---|
439 | {
|
---|
440 | return a <= b && a >= b;
|
---|
441 | }
|
---|
442 | INLINE int floatx80_le_quiet( floatx80 a, floatx80 b STATUS_PARAM)
|
---|
443 | {
|
---|
444 | return islessequal(a, b);
|
---|
445 | }
|
---|
446 | INLINE int floatx80_lt_quiet( floatx80 a, floatx80 b STATUS_PARAM)
|
---|
447 | {
|
---|
448 | return isless(a, b);
|
---|
449 |
|
---|
450 | }
|
---|
451 | INLINE int floatx80_unordered( floatx80 a, floatx80 b STATUS_PARAM)
|
---|
452 | {
|
---|
453 | return isunordered(a, b);
|
---|
454 |
|
---|
455 | }
|
---|
456 | int floatx80_compare( floatx80, floatx80 STATUS_PARAM );
|
---|
457 | int floatx80_compare_quiet( floatx80, floatx80 STATUS_PARAM );
|
---|
458 | int floatx80_is_signaling_nan( floatx80 );
|
---|
459 | int floatx80_is_nan( floatx80 );
|
---|
460 |
|
---|
461 | INLINE floatx80 floatx80_abs(floatx80 a)
|
---|
462 | {
|
---|
463 | return fabsl(a);
|
---|
464 | }
|
---|
465 |
|
---|
466 | INLINE floatx80 floatx80_chs(floatx80 a)
|
---|
467 | {
|
---|
468 | return -a;
|
---|
469 | }
|
---|
470 |
|
---|
471 | INLINE floatx80 floatx80_is_infinity(floatx80 a)
|
---|
472 | {
|
---|
473 | return fpclassify(a) == FP_INFINITE;
|
---|
474 | }
|
---|
475 |
|
---|
476 | INLINE floatx80 floatx80_is_neg(floatx80 a)
|
---|
477 | {
|
---|
478 | floatx80u u;
|
---|
479 | u.f = a;
|
---|
480 | return u.i.high >> 15;
|
---|
481 | }
|
---|
482 |
|
---|
483 | INLINE floatx80 floatx80_is_zero(floatx80 a)
|
---|
484 | {
|
---|
485 | return fpclassify(a) == FP_ZERO;
|
---|
486 | }
|
---|
487 |
|
---|
488 | INLINE floatx80 floatx80_scalbn(floatx80 a, int n)
|
---|
489 | {
|
---|
490 | return scalbnl(a, n);
|
---|
491 | }
|
---|
492 |
|
---|
493 | #endif
|
---|