1 /* DO NOT EDIT THIS FILE. 2 3 It has been auto-edited by fixincludes from: 4 5 "fixinc/tests/inc/iso/math_c99.h" 6 7 This had to be done to correct non-standard usages in the 8 original, manufacturer supplied header file. */ 9 10 11 12 #if defined( SOLARIS_MATH_1_CHECK ) 13 #ident "@(#)math_c99.h 1.9 04/11/01 SMI" 14 #undef HUGE_VAL 15 #define HUGE_VAL (__builtin_huge_val()) 16 #undef HUGE_VALF 17 #define HUGE_VALF (__builtin_huge_valf()) 18 #undef HUGE_VALL 19 #define HUGE_VALL (__builtin_huge_vall()) 20 #endif /* SOLARIS_MATH_1_CHECK */ 21 22 23 #if defined( SOLARIS_MATH_2_CHECK ) 24 #ident "@(#)math_c99.h 1.9 04/11/01 SMI" 25 #undef INFINITY 26 #define INFINITY (__builtin_inff()) 27 #endif /* SOLARIS_MATH_2_CHECK */ 28 29 30 #if defined( SOLARIS_MATH_3_CHECK ) 31 #ident "@(#)math_c99.h 1.9 04/11/01 SMI" 32 #undef NAN 33 #define NAN (__builtin_nanf("")) 34 #endif /* SOLARIS_MATH_3_CHECK */ 35 36 37 #if defined( SOLARIS_MATH_4_CHECK ) 38 #ident "@(#)math_c99.h 1.9 04/11/01 SMI" 39 #undef fpclassify 40 #define fpclassify(x) \ 41 __extension__ ({ __typeof(x) __x_fp = (x); \ 42 isnan(__x_fp) \ 43 ? FP_NAN \ 44 : isinf(__x_fp) \ 45 ? FP_INFINITE \ 46 : isnormal(__x_fp) \ 47 ? FP_NORMAL \ 48 : __x_fp == 0.0 \ 49 ? FP_ZERO \ 50 : FP_SUBNORMAL; }) 51 #endif /* SOLARIS_MATH_4_CHECK */ 52 53 54 #if defined( SOLARIS_MATH_5_CHECK ) 55 #ident "@(#)math_c99.h 1.9 04/11/01 SMI" 56 #undef isfinite 57 #define isfinite(x) \ 58 __extension__ ({ __typeof (x) __x_f = (x); \ 59 __builtin_expect(!isnan(__x_f - __x_f), 1); }) 60 #endif /* SOLARIS_MATH_5_CHECK */ 61 62 63 #if defined( SOLARIS_MATH_6_CHECK ) 64 #ident "@(#)math_c99.h 1.9 04/11/01 SMI" 65 #undef isinf 66 #define isinf(x) \ 67 __extension__ ({ __typeof (x) __x_i = (x); \ 68 __builtin_expect(!isnan(__x_i) && !isfinite(__x_i), 0); }) 69 #endif /* SOLARIS_MATH_6_CHECK */ 70 71 72 #if defined( SOLARIS_MATH_7_CHECK ) 73 #ident "@(#)math_c99.h 1.9 04/11/01 SMI" 74 #undef isnormal 75 #define isnormal(x) \ 76 __extension__ ({ __typeof(x) __x_n = (x); \ 77 if (__x_n < 0.0) __x_n = -__x_n; \ 78 __builtin_expect(isfinite(__x_n) \ 79 && (sizeof(__x_n) == sizeof(float) \ 80 ? __x_n >= __FLT_MIN__ \ 81 : sizeof(__x_n) == sizeof(long double) \ 82 ? __x_n >= __LDBL_MIN__ \ 83 : __x_n >= __DBL_MIN__), 1); }) 84 #endif /* SOLARIS_MATH_7_CHECK */ 85 86 87 #if defined( SOLARIS_MATH_8_CHECK ) 88 #ident "@(#)math_c99.h 1.9 04/11/01 SMI" 89 #undef signbit 90 #define signbit(x) (sizeof(x) == sizeof(float) \ 91 ? __builtin_signbitf(x) \ 92 : sizeof(x) == sizeof(long double) \ 93 ? __builtin_signbitl(x) \ 94 : __builtin_signbit(x)) 95 #endif /* SOLARIS_MATH_8_CHECK */ 96 97 98 #if defined( SOLARIS_MATH_9_CHECK ) 99 #ident "@(#)math_c99.h 1.9 04/11/01 SMI" 100 #undef isgreater 101 #define isgreater(x, y) __builtin_isgreater(x, y) 102 #undef isgreaterequal 103 #define isgreaterequal(x, y) __builtin_isgreaterequal(x, y) 104 #undef isless 105 #define isless(x, y) __builtin_isless(x, y) 106 #undef islessequal 107 #define islessequal(x, y) __builtin_islessequal(x, y) 108 #undef islessgreater 109 #define islessgreater(x, y) __builtin_islessgreater(x, y) 110 #undef isunordered 111 #define isunordered(x, y) __builtin_isunordered(x, y) 112 #endif /* SOLARIS_MATH_9_CHECK */ 113