Corrected build under msvc compiler #1833 (#2121)

Fixes #1833 according to task description.
This commit is contained in:
Kamil-Goras-Mobica
2024-11-12 17:55:57 +01:00
committed by GitHub
parent b149060d52
commit 265cc18843

View File

@@ -112,12 +112,19 @@ int feclearexcept(int excepts);
#if defined(__INTEL_COMPILER)
#include <mathimf.h>
#elif __cplusplus && defined(_MSC_VER)
#include <cmath>
#else
#include <math.h>
#endif
#ifdef __cplusplus
#include <cmath>
extern "C" {
using std::isfinite;
using std::isinf;
using std::isnan;
}
#endif
#ifndef M_PI
#define M_PI 3.14159265358979323846264338327950288
#endif
@@ -140,18 +147,6 @@ extern "C" {
#define INFINITY (FLT_MAX + FLT_MAX)
#endif
#ifndef isfinite
#define isfinite(x) _finite(x)
#endif
#ifndef isnan
#define isnan(x) ((x) != (x))
#endif
#ifndef isinf
#define isinf(_x) ((_x) == INFINITY || (_x) == -INFINITY)
#endif
#if _MSC_VER < 1900 && !defined(__INTEL_COMPILER)
double rint(double x);