Changeset 940
- Timestamp:
- Sep 10, 2011, 4:55:44 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/core.h
r923 r940 46 46 #endif 47 47 48 /* Ensure isnan() is present even on systems that don't define it, or 49 * when -ffast-math is being used. */ 50 #if defined __FAST_MATH__ 51 # undef isnan 52 #endif 53 #if !defined isnan 54 # define isnan isnan 55 # include <stdint.h> 56 static inline int isnan(float f) 57 { 58 union { float f; uint32_t x; } u = { f }; 59 return (u.x << 1) > 0xff000000u; 60 } 61 #endif 62 48 63 // Base types 49 64 #include "trig.h" -
trunk/test/half.cpp
r937 r940 17 17 #include "core.h" 18 18 #include "lol/unit.h" 19 20 /* Ensure isnan() is present even on systems that don't define it, or21 * when -ffast-math is being used. */22 #if defined __FAST_MATH__23 # undef isnan24 #endif25 #if !defined isnan26 static inline int isnan(float f)27 {28 union { float f; uint32_t x; } u = { f };29 return (u.x << 1) > 0xff000000u;30 }31 #endif32 19 33 20 namespace lol
Note: See TracChangeset
for help on using the changeset viewer.