00001 #ifndef _FOUNDATION_H
00002 #define _FOUNDATION_H
00003
00004 #ifdef __attribute__used__
00005 static union { uint32_t rep; float val; } __f_inf__ __attribute_used__ = {0x7f800000};
00006 static union { uint32_t rep; float val; } __f_neg_inf__ __attribute_used__ = {0xff800000};
00007 static union { uint32_t rep; float val; } __f_nan__ __attribute_used__ = {0xffc00000};
00008 static union { uint64_t rep; double val; } __d_inf__ __attribute_used__ = {0x7ff0000000000000};
00009 static union { uint64_t rep; double val; } __d_neg_inf__ __attribute_used__ = {0xfff0000000000000};
00010 static union { uint64_t rep; double val; } __d_nan__ __attribute_used__ = {0xfff8000000000000};
00011 #else
00012 static union { uint32_t rep; float val; } __f_inf__ __attribute__((used)) = {0x7f800000};
00013 static union { uint32_t rep; float val; } __f_neg_inf__ __attribute__((used)) = {0xff800000};
00014 static union { uint32_t rep; float val; } __f_nan__ __attribute__((used)) = {0xffc00000};
00015 static union { uint64_t rep; double val; } __d_inf__ __attribute__((used)) = {0x7ff0000000000000};
00016 static union { uint64_t rep; double val; } __d_neg_inf__ __attribute__((used)) = {0xfff0000000000000};
00017 static union { uint64_t rep; double val; } __d_nan__ __attribute__((used)) = {0xfff8000000000000};
00018 #endif
00019 #define F_INF (__f_inf__.val)
00020 #define F_NEG_INF (__f_neg_inf__.val)
00021 #define F_NAN (__f_nan__.val)
00022 #define D_INF (__d_inf__.val)
00023 #define D_NEG_INF (__d_neg_inf__.val)
00024 #define D_NAN (__d_nan__.val)
00025
00026 #endif // _FOUNDATION_H