Commit 2f505029 authored by Lev Walkin's avatar Lev Walkin

floating point defines moved to asn_system.h from REAL.c

parent a57953d7
......@@ -13,14 +13,6 @@
#include <errno.h>
#include <REAL.h>
#ifdef WIN32
#include <float.h>
#define copysign _copysign
#define isnan _isnan
#define finite _finite
#define ilogb _logb
#endif
#undef INT_MAX
#define INT_MAX ((int)(((unsigned int)-1) >> 1))
......@@ -528,7 +520,7 @@ asn_double2REAL(REAL_t *st, double dbl_value) {
/*
* ilogb(+-0) returns -INT_MAX or INT_MIN (platform-dependent)
* ilogb(+-inf) returns INT_MAX
* ilogb(+-inf) returns INT_MAX, logb(+-inf) returns +inf
* ilogb(NaN) returns INT_MIN or INT_MAX (platform-dependent)
*/
expval = ilogb(dbl_value);
......
......@@ -35,6 +35,11 @@ typedef unsigned short uint16_t;
typedef unsigned int uint32_t;
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <float.h>
#define isnan _isnan
#define finite _finite
#define copysign _copysign
#define ilogb _logb
#endif /* _MSC_VER */
#else /* !WIN32 */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment