#ifndef INT_MATH_H
#define INT_MATH_H
#ifndef __has_builtin
#define __has_builtin …
#endif
#if defined(_MSC_VER) && !defined(__clang__)
#include <math.h>
#include <stdlib.h>
#endif
#if defined(_MSC_VER) && !defined(__clang__)
#define CRT_INFINITY …
#else
#define CRT_INFINITY …
#endif
#if defined(_MSC_VER) && !defined(__clang__)
#define crt_isfinite …
#define crt_isinf …
#define crt_isnan …
#else
#if __has_builtin(__builtin_isfinite)
#define crt_isfinite(x) …
#elif defined(__GNUC__)
#define crt_isfinite …
#else
#error "Do not know how to check for infinity"
#endif
#define crt_isinf(x) …
#define crt_isnan(x) …
#endif
#if defined(_MSC_VER) && !defined(__clang__)
#define crt_copysign …
#define crt_copysignf …
#define crt_copysignl …
#else
#define crt_copysign(x, y) …
#define crt_copysignf(x, y) …
#define crt_copysignl(x, y) …
#if __has_builtin(__builtin_copysignf128) || \
(defined(__GNUC__) && __GNUC__ >= 7)
#define crt_copysignf128(x, y) …
#elif __has_builtin(__builtin_copysignq)
#define crt_copysignf128 …
#endif
#endif
#if defined(_MSC_VER) && !defined(__clang__)
#define crt_fabs …
#define crt_fabsf …
#define crt_fabsl …
#else
#define crt_fabs(x) …
#define crt_fabsf(x) …
#define crt_fabsl(x) …
#if __has_builtin(__builtin_fabsf128) || (defined(__GNUC__) && __GNUC__ >= 7)
#define crt_fabsf128(x) …
#elif __has_builtin(__builtin_fabsq)
#define crt_fabsf128 …
#endif
#endif
#if defined(_MSC_VER) && !defined(__clang__)
#define crt_fmaxl …
#else
#define crt_fmaxl(x, y) …
#endif
#if defined(_MSC_VER) && !defined(__clang__)
#define crt_logbl …
#else
#define crt_logbl(x) …
#endif
#if defined(_MSC_VER) && !defined(__clang__)
#define crt_scalbnl …
#else
#define crt_scalbnl(x, y) …
#endif
#endif