You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

math_compat.h 479 B

12345678910111213141516171819202122232425262728
  1. #ifndef __math_compat_h
  2. #define __math_compat_h
  3. /* Define isnan and isinf on Windows/MSVC */
  4. #ifndef HAVE_DECL_ISNAN
  5. # ifdef HAVE_DECL__ISNAN
  6. #include <float.h>
  7. #define isnan(x) _isnan(x)
  8. # endif
  9. #endif
  10. #ifndef HAVE_DECL_ISINF
  11. # ifdef HAVE_DECL__FINITE
  12. #include <float.h>
  13. #define isinf(x) (!_finite(x))
  14. # endif
  15. #endif
  16. #ifndef HAVE_DECL_NAN
  17. #error This platform does not have nan()
  18. #endif
  19. #ifndef HAVE_DECL_INFINITY
  20. #error This platform does not have INFINITY
  21. #endif
  22. #endif