Browse Source

optim: better isnan() reimplementation.

legacy
Sam Hocevar sam 13 years ago
parent
commit
3402db36c3
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      test/half.cpp

+ 1
- 1
test/half.cpp View File

@@ -30,7 +30,7 @@
static inline int isnan(float f) static inline int isnan(float f)
{ {
union { float f; uint32_t x; } u = { f }; union { float f; uint32_t x; } u = { f };
return (~u.x << 1) < 0x00fffffeu;
return (u.x << 1) > 0xff000000u;
} }
#endif #endif




Loading…
Cancel
Save