Ticket #6230: math.h.2.diff
File math.h.2.diff, 1.9 KB (added by , 14 years ago) |
---|
-
headers/posix/math.h
21 21 #define M_SQRT1_2 0.70710678118654752440 /* 1/sqrt(2) */ 22 22 23 23 /* platform independent IEEE floating point special values */ 24 #define __HUGE_VAL_v 0x7ff0000000000000LL 25 #define __huge_val_t union { unsigned char __c[8]; long long __ll; double __d; } 26 #ifndef HUGE_VAL 27 # define HUGE_VAL (((__huge_val_t) { __ll: __HUGE_VAL_v }).__d) 24 #if __GNUC__ >= 4 25 # ifndef HUGE_VAL 26 # define HUGE_VAL __builtin_huge_val() 27 # endif 28 #else 29 # define __HUGE_VAL_v 0x7ff0000000000000LL 30 # define __huge_val_t union { unsigned char __c[8]; long long __ll; double __d; } 31 # ifndef HUGE_VAL 32 # define HUGE_VAL (((__huge_val_t) { __ll: __HUGE_VAL_v }).__d) 33 # endif 28 34 #endif 29 35 30 #define __HUGE_VALF_v 0x7f800000L 31 #define __huge_valf_t union { unsigned char __c[4]; long __l; float __f; } 32 #define HUGE_VALF (((__huge_valf_t) { __l: __HUGE_VALF_v }).__f) 36 #if __GNUC__ >= 4 37 # define HUGE_VALF __builtin_huge_valf() 38 #else 39 # define __HUGE_VALF_v 0x7f800000L 40 # define __huge_valf_t union { unsigned char __c[4]; long __l; float __f; } 41 # define HUGE_VALF (((__huge_valf_t) { __l: __HUGE_VALF_v }).__f) 42 #endif 33 43 34 /* TODO: define HUGE_VALL for long doubles */ 44 /* TODO: define HUGE_VALL for long doubles for gcc2 */ 45 #if __GNUC__ >= 4 46 # define HUGE_VALL __builtin_huge_vall() 47 #endif 35 48 36 #define __NAN_VALF_v 0x7fc00000L 37 #define NAN (((__huge_valf_t) { __l: __NAN_VALF_v }).__f) 49 #if __GNUC__ >= 4 50 # define NAN __builtin_nanf("") 51 #else 52 # define __NAN_VALF_v 0x7fc00000L 53 # define NAN (((__huge_valf_t) { __l: __NAN_VALF_v }).__f) 54 #endif 38 55 39 #define INFINITY HUGE_VALF 56 #if __GNUC__ >= 4 57 # define INFINITY __builtin_inff() 58 #else 59 # define INFINITY HUGE_VALF 60 #endif 40 61 41 62 /* floating-point categories */ 42 63 #define FP_NAN 0