Index: libcxx/CMakeLists.txt =================================================================== --- libcxx/CMakeLists.txt +++ libcxx/CMakeLists.txt @@ -94,6 +94,11 @@ support the C functionality for wide characters. When wide characters are not supported, several parts of the library will be disabled, notably the wide character specializations of std::basic_string." ON) +option(LIBCXX_ENABLE_LONG_DOUBLE_MATH + "Whether to include support for long double math functions in the library. + Disabling long double support can be useful when porting to platforms that + don't support the C long double math functions. When long doubles are not + supported, several cmath and math.h the library will be disabled." ON) option(LIBCXX_ENABLE_VENDOR_AVAILABILITY_ANNOTATIONS "Whether to turn on vendor availability annotations on declarations that depend on definitions in a shared library. By default, we assume that we're not building @@ -857,6 +862,7 @@ config_define_if_not(LIBCXX_ENABLE_LOCALIZATION _LIBCPP_HAS_NO_LOCALIZATION) config_define_if_not(LIBCXX_ENABLE_UNICODE _LIBCPP_HAS_NO_UNICODE) config_define_if_not(LIBCXX_ENABLE_WIDE_CHARACTERS _LIBCPP_HAS_NO_WIDE_CHARACTERS) +config_define_if_not(LIBCXX_ENABLE_LONG_DOUBLE_MATH _LIBCPP_HAS_NO_LONG_DOUBLE_MATH) config_define_if_not(LIBCXX_ENABLE_VENDOR_AVAILABILITY_ANNOTATIONS _LIBCPP_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS) config_define_if(LIBCXX_ENABLE_DEBUG_MODE _LIBCPP_ENABLE_DEBUG_MODE) if (LIBCXX_ENABLE_ASSERTIONS) Index: libcxx/cmake/caches/Generic-no-long-double-math.cmake =================================================================== --- /dev/null +++ libcxx/cmake/caches/Generic-no-long-double-math.cmake @@ -0,0 +1 @@ +set(LIBCXX_ENABLE_LONG_DOUBLE_MATH OFF CACHE BOOL "") Index: libcxx/docs/BuildingLibcxx.rst =================================================================== --- libcxx/docs/BuildingLibcxx.rst +++ libcxx/docs/BuildingLibcxx.rst @@ -265,6 +265,16 @@ support for ``wchar_t``. This is especially useful in embedded settings where C Standard Libraries don't always provide all the usual bells and whistles. +.. option:: LIBCXX_ENABLE_LONG_DOUBLE_MATH:BOOL + + **Default**: ``ON`` + + This option can be used to disable support for ``long double`` in the math + library. It also allows the math library to work on top of a C Standard + Library that does not provide support for ``long double`` math functions. + This is especially useful in embedded settings where C Standard Libraries + don't always provide all the usual bells and whistles. + .. option:: LIBCXX_INSTALL_LIBRARY_DIR:PATH **Default**: ``lib${LIBCXX_LIBDIR_SUFFIX}`` Index: libcxx/include/__config_site.in =================================================================== --- libcxx/include/__config_site.in +++ libcxx/include/__config_site.in @@ -29,6 +29,7 @@ #cmakedefine _LIBCPP_HAS_NO_RANDOM_DEVICE #cmakedefine _LIBCPP_HAS_NO_LOCALIZATION #cmakedefine _LIBCPP_HAS_NO_WIDE_CHARACTERS +#cmakedefine _LIBCPP_HAS_NO_LONG_DOUBLE_MATH #cmakedefine01 _LIBCPP_ENABLE_ASSERTIONS_DEFAULT #cmakedefine _LIBCPP_ENABLE_DEBUG_MODE Index: libcxx/include/cmath =================================================================== --- libcxx/include/cmath +++ libcxx/include/cmath @@ -541,7 +541,9 @@ #if _LIBCPP_STD_VER > 14 inline _LIBCPP_INLINE_VISIBILITY float hypot( float __x, float __y, float __z ) { return sqrt(__x*__x + __y*__y + __z*__z); } inline _LIBCPP_INLINE_VISIBILITY double hypot( double __x, double __y, double __z ) { return sqrt(__x*__x + __y*__y + __z*__z); } +# ifndef _LIBCPP_HAS_NO_LONG_DOUBLE_MATH inline _LIBCPP_INLINE_VISIBILITY long double hypot( long double __x, long double __y, long double __z ) { return sqrt(__x*__x + __y*__y + __z*__z); } +# endif template inline _LIBCPP_INLINE_VISIBILITY Index: libcxx/include/math.h =================================================================== --- libcxx/include/math.h +++ libcxx/include/math.h @@ -510,9 +510,11 @@ bool isinf(double __lcpp_x) _NOEXCEPT { return __libcpp_isinf(__lcpp_x); } +# ifndef _LIBCPP_HAS_NO_LONG_DOUBLE_MATH inline _LIBCPP_INLINE_VISIBILITY bool isinf(long double __lcpp_x) _NOEXCEPT { return __libcpp_isinf(__lcpp_x); } +# endif // !_LIBCPP_HAS_NO_LONG_DOUBLE_MATH #endif #endif // isinf @@ -558,9 +560,11 @@ bool isnan(double __lcpp_x) _NOEXCEPT { return __libcpp_isnan(__lcpp_x); } +# ifndef _LIBCPP_HAS_NO_LONG_DOUBLE_MATH inline _LIBCPP_INLINE_VISIBILITY bool isnan(long double __lcpp_x) _NOEXCEPT { return __libcpp_isnan(__lcpp_x); } +# endif // !_LIBCPP_HAS_NO_LONG_DOUBLE_MATH #endif #endif // isnan @@ -791,7 +795,9 @@ # if !defined(__sun__) inline _LIBCPP_INLINE_VISIBILITY float acos(float __lcpp_x) _NOEXCEPT {return ::acosf(__lcpp_x);} +# ifndef _LIBCPP_HAS_NO_LONG_DOUBLE_MATH inline _LIBCPP_INLINE_VISIBILITY long double acos(long double __lcpp_x) _NOEXCEPT {return ::acosl(__lcpp_x);} +# endif # endif template @@ -803,7 +809,9 @@ # if !defined(__sun__) inline _LIBCPP_INLINE_VISIBILITY float asin(float __lcpp_x) _NOEXCEPT {return ::asinf(__lcpp_x);} +# ifndef _LIBCPP_HAS_NO_LONG_DOUBLE_MATH inline _LIBCPP_INLINE_VISIBILITY long double asin(long double __lcpp_x) _NOEXCEPT {return ::asinl(__lcpp_x);} +# endif # endif template @@ -815,7 +823,9 @@ # if !defined(__sun__) inline _LIBCPP_INLINE_VISIBILITY float atan(float __lcpp_x) _NOEXCEPT {return ::atanf(__lcpp_x);} +# ifndef _LIBCPP_HAS_NO_LONG_DOUBLE_MATH inline _LIBCPP_INLINE_VISIBILITY long double atan(long double __lcpp_x) _NOEXCEPT {return ::atanl(__lcpp_x);} +# endif # endif template @@ -827,7 +837,9 @@ # if !defined(__sun__) inline _LIBCPP_INLINE_VISIBILITY float atan2(float __lcpp_y, float __lcpp_x) _NOEXCEPT {return ::atan2f(__lcpp_y, __lcpp_x);} +# ifndef _LIBCPP_HAS_NO_LONG_DOUBLE_MATH inline _LIBCPP_INLINE_VISIBILITY long double atan2(long double __lcpp_y, long double __lcpp_x) _NOEXCEPT {return ::atan2l(__lcpp_y, __lcpp_x);} +# endif # endif template @@ -850,7 +862,9 @@ # if !defined(__sun__) inline _LIBCPP_INLINE_VISIBILITY float ceil(float __lcpp_x) _NOEXCEPT {return ::ceilf(__lcpp_x);} +# ifndef _LIBCPP_HAS_NO_LONG_DOUBLE_MATH inline _LIBCPP_INLINE_VISIBILITY long double ceil(long double __lcpp_x) _NOEXCEPT {return ::ceill(__lcpp_x);} +# endif # endif template @@ -862,7 +876,9 @@ # if !defined(__sun__) inline _LIBCPP_INLINE_VISIBILITY float cos(float __lcpp_x) _NOEXCEPT {return ::cosf(__lcpp_x);} +# ifndef _LIBCPP_HAS_NO_LONG_DOUBLE_MATH inline _LIBCPP_INLINE_VISIBILITY long double cos(long double __lcpp_x) _NOEXCEPT {return ::cosl(__lcpp_x);} +# endif # endif template @@ -874,7 +890,9 @@ # if !defined(__sun__) inline _LIBCPP_INLINE_VISIBILITY float cosh(float __lcpp_x) _NOEXCEPT {return ::coshf(__lcpp_x);} +# ifndef _LIBCPP_HAS_NO_LONG_DOUBLE_MATH inline _LIBCPP_INLINE_VISIBILITY long double cosh(long double __lcpp_x) _NOEXCEPT {return ::coshl(__lcpp_x);} +# endif # endif template @@ -886,7 +904,9 @@ # if !defined(__sun__) inline _LIBCPP_INLINE_VISIBILITY float exp(float __lcpp_x) _NOEXCEPT {return ::expf(__lcpp_x);} +# ifndef _LIBCPP_HAS_NO_LONG_DOUBLE_MATH inline _LIBCPP_INLINE_VISIBILITY long double exp(long double __lcpp_x) _NOEXCEPT {return ::expl(__lcpp_x);} +# endif # endif template @@ -898,7 +918,9 @@ # if !defined(__sun__) inline _LIBCPP_INLINE_VISIBILITY float fabs(float __lcpp_x) _NOEXCEPT {return ::fabsf(__lcpp_x);} +# ifndef _LIBCPP_HAS_NO_LONG_DOUBLE_MATH inline _LIBCPP_INLINE_VISIBILITY long double fabs(long double __lcpp_x) _NOEXCEPT {return ::fabsl(__lcpp_x);} +# endif # endif template @@ -910,7 +932,9 @@ # if !defined(__sun__) inline _LIBCPP_INLINE_VISIBILITY float floor(float __lcpp_x) _NOEXCEPT {return ::floorf(__lcpp_x);} +# ifndef _LIBCPP_HAS_NO_LONG_DOUBLE_MATH inline _LIBCPP_INLINE_VISIBILITY long double floor(long double __lcpp_x) _NOEXCEPT {return ::floorl(__lcpp_x);} +# endif # endif template @@ -922,7 +946,9 @@ # if !defined(__sun__) inline _LIBCPP_INLINE_VISIBILITY float fmod(float __lcpp_x, float __lcpp_y) _NOEXCEPT {return ::fmodf(__lcpp_x, __lcpp_y);} +# ifndef _LIBCPP_HAS_NO_LONG_DOUBLE_MATH inline _LIBCPP_INLINE_VISIBILITY long double fmod(long double __lcpp_x, long double __lcpp_y) _NOEXCEPT {return ::fmodl(__lcpp_x, __lcpp_y);} +# endif # endif template @@ -945,7 +971,9 @@ # if !defined(__sun__) inline _LIBCPP_INLINE_VISIBILITY float frexp(float __lcpp_x, int* __lcpp_e) _NOEXCEPT {return ::frexpf(__lcpp_x, __lcpp_e);} +# ifndef _LIBCPP_HAS_NO_LONG_DOUBLE_MATH inline _LIBCPP_INLINE_VISIBILITY long double frexp(long double __lcpp_x, int* __lcpp_e) _NOEXCEPT {return ::frexpl(__lcpp_x, __lcpp_e);} +# endif # endif template @@ -957,7 +985,9 @@ # if !defined(__sun__) inline _LIBCPP_INLINE_VISIBILITY float ldexp(float __lcpp_x, int __lcpp_e) _NOEXCEPT {return ::ldexpf(__lcpp_x, __lcpp_e);} +# ifndef _LIBCPP_HAS_NO_LONG_DOUBLE_MATH inline _LIBCPP_INLINE_VISIBILITY long double ldexp(long double __lcpp_x, int __lcpp_e) _NOEXCEPT {return ::ldexpl(__lcpp_x, __lcpp_e);} +# endif # endif template @@ -969,7 +999,9 @@ # if !defined(__sun__) inline _LIBCPP_INLINE_VISIBILITY float log(float __lcpp_x) _NOEXCEPT {return ::logf(__lcpp_x);} +# ifndef _LIBCPP_HAS_NO_LONG_DOUBLE_MATH inline _LIBCPP_INLINE_VISIBILITY long double log(long double __lcpp_x) _NOEXCEPT {return ::logl(__lcpp_x);} +# endif # endif template @@ -981,7 +1013,9 @@ # if !defined(__sun__) inline _LIBCPP_INLINE_VISIBILITY float log10(float __lcpp_x) _NOEXCEPT {return ::log10f(__lcpp_x);} +# ifndef _LIBCPP_HAS_NO_LONG_DOUBLE_MATH inline _LIBCPP_INLINE_VISIBILITY long double log10(long double __lcpp_x) _NOEXCEPT {return ::log10l(__lcpp_x);} +# endif # endif template @@ -993,14 +1027,18 @@ # if !defined(__sun__) inline _LIBCPP_INLINE_VISIBILITY float modf(float __lcpp_x, float* __lcpp_y) _NOEXCEPT {return ::modff(__lcpp_x, __lcpp_y);} +# ifndef _LIBCPP_HAS_NO_LONG_DOUBLE_MATH inline _LIBCPP_INLINE_VISIBILITY long double modf(long double __lcpp_x, long double* __lcpp_y) _NOEXCEPT {return ::modfl(__lcpp_x, __lcpp_y);} +# endif # endif // pow # if !defined(__sun__) inline _LIBCPP_INLINE_VISIBILITY float pow(float __lcpp_x, float __lcpp_y) _NOEXCEPT {return ::powf(__lcpp_x, __lcpp_y);} +# ifndef _LIBCPP_HAS_NO_LONG_DOUBLE_MATH inline _LIBCPP_INLINE_VISIBILITY long double pow(long double __lcpp_x, long double __lcpp_y) _NOEXCEPT {return ::powl(__lcpp_x, __lcpp_y);} +# endif # endif template @@ -1023,8 +1061,10 @@ # if !defined(__sun__) inline _LIBCPP_INLINE_VISIBILITY float sin(float __lcpp_x) _NOEXCEPT {return ::sinf(__lcpp_x);} +# ifndef _LIBCPP_HAS_NO_LONG_DOUBLE_MATH inline _LIBCPP_INLINE_VISIBILITY long double sin(long double __lcpp_x) _NOEXCEPT {return ::sinl(__lcpp_x);} -#endif +# endif +# endif template inline _LIBCPP_INLINE_VISIBILITY @@ -1035,7 +1075,9 @@ # if !defined(__sun__) inline _LIBCPP_INLINE_VISIBILITY float sinh(float __lcpp_x) _NOEXCEPT {return ::sinhf(__lcpp_x);} +# ifndef _LIBCPP_HAS_NO_LONG_DOUBLE_MATH inline _LIBCPP_INLINE_VISIBILITY long double sinh(long double __lcpp_x) _NOEXCEPT {return ::sinhl(__lcpp_x);} +# endif # endif template @@ -1047,7 +1089,9 @@ # if !defined(__sun__) inline _LIBCPP_INLINE_VISIBILITY float sqrt(float __lcpp_x) _NOEXCEPT {return ::sqrtf(__lcpp_x);} +# ifndef _LIBCPP_HAS_NO_LONG_DOUBLE_MATH inline _LIBCPP_INLINE_VISIBILITY long double sqrt(long double __lcpp_x) _NOEXCEPT {return ::sqrtl(__lcpp_x);} +# endif # endif template @@ -1059,7 +1103,9 @@ # if !defined(__sun__) inline _LIBCPP_INLINE_VISIBILITY float tan(float __lcpp_x) _NOEXCEPT {return ::tanf(__lcpp_x);} +# ifndef _LIBCPP_HAS_NO_LONG_DOUBLE_MATH inline _LIBCPP_INLINE_VISIBILITY long double tan(long double __lcpp_x) _NOEXCEPT {return ::tanl(__lcpp_x);} +# endif # endif template @@ -1071,7 +1117,9 @@ # if !defined(__sun__) inline _LIBCPP_INLINE_VISIBILITY float tanh(float __lcpp_x) _NOEXCEPT {return ::tanhf(__lcpp_x);} +# ifndef _LIBCPP_HAS_NO_LONG_DOUBLE_MATH inline _LIBCPP_INLINE_VISIBILITY long double tanh(long double __lcpp_x) _NOEXCEPT {return ::tanhl(__lcpp_x);} +# endif # endif template @@ -1082,7 +1130,9 @@ // acosh inline _LIBCPP_INLINE_VISIBILITY float acosh(float __lcpp_x) _NOEXCEPT {return ::acoshf(__lcpp_x);} +#ifndef _LIBCPP_HAS_NO_LONG_DOUBLE_MATH inline _LIBCPP_INLINE_VISIBILITY long double acosh(long double __lcpp_x) _NOEXCEPT {return ::acoshl(__lcpp_x);} +#endif template inline _LIBCPP_INLINE_VISIBILITY @@ -1092,7 +1142,9 @@ // asinh inline _LIBCPP_INLINE_VISIBILITY float asinh(float __lcpp_x) _NOEXCEPT {return ::asinhf(__lcpp_x);} +#ifndef _LIBCPP_HAS_NO_LONG_DOUBLE_MATH inline _LIBCPP_INLINE_VISIBILITY long double asinh(long double __lcpp_x) _NOEXCEPT {return ::asinhl(__lcpp_x);} +#endif template inline _LIBCPP_INLINE_VISIBILITY @@ -1102,7 +1154,10 @@ // atanh inline _LIBCPP_INLINE_VISIBILITY float atanh(float __lcpp_x) _NOEXCEPT {return ::atanhf(__lcpp_x);} +#ifndef _LIBCPP_HAS_NO_LONG_DOUBLE_MATH inline _LIBCPP_INLINE_VISIBILITY long double atanh(long double __lcpp_x) _NOEXCEPT {return ::atanhl(__lcpp_x);} +#endif + template inline _LIBCPP_INLINE_VISIBILITY @@ -1112,7 +1167,9 @@ // cbrt inline _LIBCPP_INLINE_VISIBILITY float cbrt(float __lcpp_x) _NOEXCEPT {return ::cbrtf(__lcpp_x);} +#ifndef _LIBCPP_HAS_NO_LONG_DOUBLE_MATH inline _LIBCPP_INLINE_VISIBILITY long double cbrt(long double __lcpp_x) _NOEXCEPT {return ::cbrtl(__lcpp_x);} +#endif template inline _LIBCPP_INLINE_VISIBILITY @@ -1143,16 +1200,18 @@ #endif } -#if __has_builtin(__builtin_copysignl) +#ifndef _LIBCPP_HAS_NO_LONG_DOUBLE_MATH +# if __has_builtin(__builtin_copysignl) _LIBCPP_CONSTEXPR -#endif +# endif inline _LIBCPP_INLINE_VISIBILITY long double __libcpp_copysign(long double __lcpp_x, long double __lcpp_y) _NOEXCEPT { -#if __has_builtin(__builtin_copysignl) +# if __has_builtin(__builtin_copysignl) return __builtin_copysignl(__lcpp_x, __lcpp_y); -#else +# else return ::copysignl(__lcpp_x, __lcpp_y); -#endif +# endif } +#endif // !_LIBCPP_HAS_NO_LONG_DOUBLE_MATH template #if __has_builtin(__builtin_copysign) @@ -1180,9 +1239,11 @@ return ::__libcpp_copysign(__lcpp_x, __lcpp_y); } +#ifndef _LIBCPP_HAS_NO_LONG_DOUBLE_MATH inline _LIBCPP_INLINE_VISIBILITY long double copysign(long double __lcpp_x, long double __lcpp_y) _NOEXCEPT { return ::__libcpp_copysign(__lcpp_x, __lcpp_y); } +#endif template inline _LIBCPP_INLINE_VISIBILITY @@ -1199,7 +1260,9 @@ // erf inline _LIBCPP_INLINE_VISIBILITY float erf(float __lcpp_x) _NOEXCEPT {return ::erff(__lcpp_x);} +#ifndef _LIBCPP_HAS_NO_LONG_DOUBLE_MATH inline _LIBCPP_INLINE_VISIBILITY long double erf(long double __lcpp_x) _NOEXCEPT {return ::erfl(__lcpp_x);} +#endif template inline _LIBCPP_INLINE_VISIBILITY @@ -1209,7 +1272,9 @@ // erfc inline _LIBCPP_INLINE_VISIBILITY float erfc(float __lcpp_x) _NOEXCEPT {return ::erfcf(__lcpp_x);} +#ifndef _LIBCPP_HAS_NO_LONG_DOUBLE_MATH inline _LIBCPP_INLINE_VISIBILITY long double erfc(long double __lcpp_x) _NOEXCEPT {return ::erfcl(__lcpp_x);} +#endif template inline _LIBCPP_INLINE_VISIBILITY @@ -1219,7 +1284,9 @@ // exp2 inline _LIBCPP_INLINE_VISIBILITY float exp2(float __lcpp_x) _NOEXCEPT {return ::exp2f(__lcpp_x);} +#ifndef _LIBCPP_HAS_NO_LONG_DOUBLE_MATH inline _LIBCPP_INLINE_VISIBILITY long double exp2(long double __lcpp_x) _NOEXCEPT {return ::exp2l(__lcpp_x);} +#endif template inline _LIBCPP_INLINE_VISIBILITY @@ -1229,7 +1296,9 @@ // expm1 inline _LIBCPP_INLINE_VISIBILITY float expm1(float __lcpp_x) _NOEXCEPT {return ::expm1f(__lcpp_x);} +#ifndef _LIBCPP_HAS_NO_LONG_DOUBLE_MATH inline _LIBCPP_INLINE_VISIBILITY long double expm1(long double __lcpp_x) _NOEXCEPT {return ::expm1l(__lcpp_x);} +#endif template inline _LIBCPP_INLINE_VISIBILITY @@ -1239,7 +1308,9 @@ // fdim inline _LIBCPP_INLINE_VISIBILITY float fdim(float __lcpp_x, float __lcpp_y) _NOEXCEPT {return ::fdimf(__lcpp_x, __lcpp_y);} +#ifndef _LIBCPP_HAS_NO_LONG_DOUBLE_MATH inline _LIBCPP_INLINE_VISIBILITY long double fdim(long double __lcpp_x, long double __lcpp_y) _NOEXCEPT {return ::fdiml(__lcpp_x, __lcpp_y);} +#endif template inline _LIBCPP_INLINE_VISIBILITY @@ -1267,14 +1338,16 @@ return ::fmaf(__lcpp_x, __lcpp_y, __lcpp_z); #endif } +#ifndef _LIBCPP_HAS_NO_LONG_DOUBLE_MATH inline _LIBCPP_INLINE_VISIBILITY long double fma(long double __lcpp_x, long double __lcpp_y, long double __lcpp_z) _NOEXCEPT { -#if __has_builtin(__builtin_fmal) +# if __has_builtin(__builtin_fmal) return __builtin_fmal(__lcpp_x, __lcpp_y, __lcpp_z); -#else +# else return ::fmal(__lcpp_x, __lcpp_y, __lcpp_z); -#endif +# endif } +#endif // !_LIBCPP_HAS_NO_LONG_DOUBLE_MATH template inline _LIBCPP_INLINE_VISIBILITY @@ -1301,7 +1374,9 @@ // fmax inline _LIBCPP_INLINE_VISIBILITY float fmax(float __lcpp_x, float __lcpp_y) _NOEXCEPT {return ::fmaxf(__lcpp_x, __lcpp_y);} +#ifndef _LIBCPP_HAS_NO_LONG_DOUBLE_MATH inline _LIBCPP_INLINE_VISIBILITY long double fmax(long double __lcpp_x, long double __lcpp_y) _NOEXCEPT {return ::fmaxl(__lcpp_x, __lcpp_y);} +#endif template inline _LIBCPP_INLINE_VISIBILITY @@ -1322,7 +1397,9 @@ // fmin inline _LIBCPP_INLINE_VISIBILITY float fmin(float __lcpp_x, float __lcpp_y) _NOEXCEPT {return ::fminf(__lcpp_x, __lcpp_y);} +#ifndef _LIBCPP_HAS_NO_LONG_DOUBLE_MATH inline _LIBCPP_INLINE_VISIBILITY long double fmin(long double __lcpp_x, long double __lcpp_y) _NOEXCEPT {return ::fminl(__lcpp_x, __lcpp_y);} +#endif template inline _LIBCPP_INLINE_VISIBILITY @@ -1343,7 +1420,9 @@ // hypot inline _LIBCPP_INLINE_VISIBILITY float hypot(float __lcpp_x, float __lcpp_y) _NOEXCEPT {return ::hypotf(__lcpp_x, __lcpp_y);} +#ifndef _LIBCPP_HAS_NO_LONG_DOUBLE_MATH inline _LIBCPP_INLINE_VISIBILITY long double hypot(long double __lcpp_x, long double __lcpp_y) _NOEXCEPT {return ::hypotl(__lcpp_x, __lcpp_y);} +#endif template inline _LIBCPP_INLINE_VISIBILITY @@ -1364,7 +1443,9 @@ // ilogb inline _LIBCPP_INLINE_VISIBILITY int ilogb(float __lcpp_x) _NOEXCEPT {return ::ilogbf(__lcpp_x);} +#ifndef _LIBCPP_HAS_NO_LONG_DOUBLE_MATH inline _LIBCPP_INLINE_VISIBILITY int ilogb(long double __lcpp_x) _NOEXCEPT {return ::ilogbl(__lcpp_x);} +#endif template inline _LIBCPP_INLINE_VISIBILITY @@ -1374,7 +1455,9 @@ // lgamma inline _LIBCPP_INLINE_VISIBILITY float lgamma(float __lcpp_x) _NOEXCEPT {return ::lgammaf(__lcpp_x);} +#ifndef _LIBCPP_HAS_NO_LONG_DOUBLE_MATH inline _LIBCPP_INLINE_VISIBILITY long double lgamma(long double __lcpp_x) _NOEXCEPT {return ::lgammal(__lcpp_x);} +#endif template inline _LIBCPP_INLINE_VISIBILITY @@ -1391,14 +1474,16 @@ return ::llrintf(__lcpp_x); #endif } +#ifndef _LIBCPP_HAS_NO_LONG_DOUBLE_MATH inline _LIBCPP_INLINE_VISIBILITY long long llrint(long double __lcpp_x) _NOEXCEPT { -#if __has_builtin(__builtin_llrintl) +# if __has_builtin(__builtin_llrintl) return __builtin_llrintl(__lcpp_x); -#else +# else return ::llrintl(__lcpp_x); -#endif +# endif } +#endif // !_LIBCPP_HAS_NO_LONG_DOUBLE_MATH template inline _LIBCPP_INLINE_VISIBILITY @@ -1422,14 +1507,16 @@ return ::llroundf(__lcpp_x); #endif } +#ifndef _LIBCPP_HAS_NO_LONG_DOUBLE_MATH inline _LIBCPP_INLINE_VISIBILITY long long llround(long double __lcpp_x) _NOEXCEPT { -#if __has_builtin(__builtin_llroundl) +# if __has_builtin(__builtin_llroundl) return __builtin_llroundl(__lcpp_x); -#else +# else return ::llroundl(__lcpp_x); -#endif +# endif } +#endif // !_LIBCPP_HAS_NO_LONG_DOUBLE_MATH template inline _LIBCPP_INLINE_VISIBILITY @@ -1446,7 +1533,9 @@ // log1p inline _LIBCPP_INLINE_VISIBILITY float log1p(float __lcpp_x) _NOEXCEPT {return ::log1pf(__lcpp_x);} +#ifndef _LIBCPP_HAS_NO_LONG_DOUBLE_MATH inline _LIBCPP_INLINE_VISIBILITY long double log1p(long double __lcpp_x) _NOEXCEPT {return ::log1pl(__lcpp_x);} +#endif template inline _LIBCPP_INLINE_VISIBILITY @@ -1456,7 +1545,9 @@ // log2 inline _LIBCPP_INLINE_VISIBILITY float log2(float __lcpp_x) _NOEXCEPT {return ::log2f(__lcpp_x);} +#ifndef _LIBCPP_HAS_NO_LONG_DOUBLE_MATH inline _LIBCPP_INLINE_VISIBILITY long double log2(long double __lcpp_x) _NOEXCEPT {return ::log2l(__lcpp_x);} +#endif template inline _LIBCPP_INLINE_VISIBILITY @@ -1466,7 +1557,9 @@ // logb inline _LIBCPP_INLINE_VISIBILITY float logb(float __lcpp_x) _NOEXCEPT {return ::logbf(__lcpp_x);} +#ifndef _LIBCPP_HAS_NO_LONG_DOUBLE_MATH inline _LIBCPP_INLINE_VISIBILITY long double logb(long double __lcpp_x) _NOEXCEPT {return ::logbl(__lcpp_x);} +#endif template inline _LIBCPP_INLINE_VISIBILITY @@ -1483,14 +1576,16 @@ return ::lrintf(__lcpp_x); #endif } +#ifndef _LIBCPP_HAS_NO_LONG_DOUBLE_MATH inline _LIBCPP_INLINE_VISIBILITY long lrint(long double __lcpp_x) _NOEXCEPT { -#if __has_builtin(__builtin_lrintl) +# if __has_builtin(__builtin_lrintl) return __builtin_lrintl(__lcpp_x); -#else +# else return ::lrintl(__lcpp_x); -#endif +# endif } +#endif // !_LIBCPP_HAS_NO_LONG_DOUBLE_MATH template inline _LIBCPP_INLINE_VISIBILITY @@ -1514,14 +1609,16 @@ return ::lroundf(__lcpp_x); #endif } +#ifndef _LIBCPP_HAS_NO_LONG_DOUBLE_MATH inline _LIBCPP_INLINE_VISIBILITY long lround(long double __lcpp_x) _NOEXCEPT { -#if __has_builtin(__builtin_lroundl) +# if __has_builtin(__builtin_lroundl) return __builtin_lroundl(__lcpp_x); -#else +# else return ::lroundl(__lcpp_x); -#endif +# endif } +#endif // !_LIBCPP_HAS_NO_LONG_DOUBLE_MATH template inline _LIBCPP_INLINE_VISIBILITY @@ -1540,7 +1637,9 @@ // nearbyint inline _LIBCPP_INLINE_VISIBILITY float nearbyint(float __lcpp_x) _NOEXCEPT {return ::nearbyintf(__lcpp_x);} +#ifndef _LIBCPP_HAS_NO_LONG_DOUBLE_MATH inline _LIBCPP_INLINE_VISIBILITY long double nearbyint(long double __lcpp_x) _NOEXCEPT {return ::nearbyintl(__lcpp_x);} +#endif template inline _LIBCPP_INLINE_VISIBILITY @@ -1550,7 +1649,9 @@ // nextafter inline _LIBCPP_INLINE_VISIBILITY float nextafter(float __lcpp_x, float __lcpp_y) _NOEXCEPT {return ::nextafterf(__lcpp_x, __lcpp_y);} +#ifndef _LIBCPP_HAS_NO_LONG_DOUBLE_MATH inline _LIBCPP_INLINE_VISIBILITY long double nextafter(long double __lcpp_x, long double __lcpp_y) _NOEXCEPT {return ::nextafterl(__lcpp_x, __lcpp_y);} +#endif template inline _LIBCPP_INLINE_VISIBILITY @@ -1570,6 +1671,7 @@ // nexttoward +#ifndef _LIBCPP_HAS_NO_LONG_DOUBLE_MATH inline _LIBCPP_INLINE_VISIBILITY float nexttoward(float __lcpp_x, long double __lcpp_y) _NOEXCEPT {return ::nexttowardf(__lcpp_x, __lcpp_y);} inline _LIBCPP_INLINE_VISIBILITY long double nexttoward(long double __lcpp_x, long double __lcpp_y) _NOEXCEPT {return ::nexttowardl(__lcpp_x, __lcpp_y);} @@ -1577,11 +1679,14 @@ inline _LIBCPP_INLINE_VISIBILITY typename std::enable_if::value, double>::type nexttoward(_A1 __lcpp_x, long double __lcpp_y) _NOEXCEPT {return ::nexttoward((double)__lcpp_x, __lcpp_y);} +#endif // !_LIBCPP_HAS_NO_LONG_DOUBLE_MATH // remainder inline _LIBCPP_INLINE_VISIBILITY float remainder(float __lcpp_x, float __lcpp_y) _NOEXCEPT {return ::remainderf(__lcpp_x, __lcpp_y);} +#ifndef _LIBCPP_HAS_NO_LONG_DOUBLE_MATH inline _LIBCPP_INLINE_VISIBILITY long double remainder(long double __lcpp_x, long double __lcpp_y) _NOEXCEPT {return ::remainderl(__lcpp_x, __lcpp_y);} +#endif template inline _LIBCPP_INLINE_VISIBILITY @@ -1602,7 +1707,9 @@ // remquo inline _LIBCPP_INLINE_VISIBILITY float remquo(float __lcpp_x, float __lcpp_y, int* __lcpp_z) _NOEXCEPT {return ::remquof(__lcpp_x, __lcpp_y, __lcpp_z);} +#ifndef _LIBCPP_HAS_NO_LONG_DOUBLE_MATH inline _LIBCPP_INLINE_VISIBILITY long double remquo(long double __lcpp_x, long double __lcpp_y, int* __lcpp_z) _NOEXCEPT {return ::remquol(__lcpp_x, __lcpp_y, __lcpp_z);} +#endif template inline _LIBCPP_INLINE_VISIBILITY @@ -1630,14 +1737,16 @@ return ::rintf(__lcpp_x); #endif } +#ifndef _LIBCPP_HAS_NO_LONG_DOUBLE_MATH inline _LIBCPP_INLINE_VISIBILITY long double rint(long double __lcpp_x) _NOEXCEPT { -#if __has_builtin(__builtin_rintl) +# if __has_builtin(__builtin_rintl) return __builtin_rintl(__lcpp_x); -#else +# else return ::rintl(__lcpp_x); -#endif +# endif } +#endif // !_LIBCPP_HAS_NO_LONG_DOUBLE_MATH template inline _LIBCPP_INLINE_VISIBILITY @@ -1661,14 +1770,16 @@ return ::round(__lcpp_x); #endif } +#ifndef _LIBCPP_HAS_NO_LONG_DOUBLE_MATH inline _LIBCPP_INLINE_VISIBILITY long double round(long double __lcpp_x) _NOEXCEPT { -#if __has_builtin(__builtin_roundl) +# if __has_builtin(__builtin_roundl) return __builtin_roundl(__lcpp_x); -#else +# else return ::roundl(__lcpp_x); -#endif +# endif } +#endif // !_LIBCPP_HAS_NO_LONG_DOUBLE_MATH template inline _LIBCPP_INLINE_VISIBILITY @@ -1685,7 +1796,9 @@ // scalbln inline _LIBCPP_INLINE_VISIBILITY float scalbln(float __lcpp_x, long __lcpp_y) _NOEXCEPT {return ::scalblnf(__lcpp_x, __lcpp_y);} +#ifndef _LIBCPP_HAS_NO_LONG_DOUBLE_MATH inline _LIBCPP_INLINE_VISIBILITY long double scalbln(long double __lcpp_x, long __lcpp_y) _NOEXCEPT {return ::scalblnl(__lcpp_x, __lcpp_y);} +#endif template inline _LIBCPP_INLINE_VISIBILITY @@ -1695,7 +1808,9 @@ // scalbn inline _LIBCPP_INLINE_VISIBILITY float scalbn(float __lcpp_x, int __lcpp_y) _NOEXCEPT {return ::scalbnf(__lcpp_x, __lcpp_y);} +#ifndef _LIBCPP_HAS_NO_LONG_DOUBLE_MATH inline _LIBCPP_INLINE_VISIBILITY long double scalbn(long double __lcpp_x, int __lcpp_y) _NOEXCEPT {return ::scalbnl(__lcpp_x, __lcpp_y);} +#endif template inline _LIBCPP_INLINE_VISIBILITY @@ -1705,7 +1820,9 @@ // tgamma inline _LIBCPP_INLINE_VISIBILITY float tgamma(float __lcpp_x) _NOEXCEPT {return ::tgammaf(__lcpp_x);} +#ifndef _LIBCPP_HAS_NO_LONG_DOUBLE_MATH inline _LIBCPP_INLINE_VISIBILITY long double tgamma(long double __lcpp_x) _NOEXCEPT {return ::tgammal(__lcpp_x);} +#endif template inline _LIBCPP_INLINE_VISIBILITY @@ -1722,14 +1839,16 @@ return ::trunc(__lcpp_x); #endif } +#ifndef _LIBCPP_HAS_NO_LONG_DOUBLE_MATH inline _LIBCPP_INLINE_VISIBILITY long double trunc(long double __lcpp_x) _NOEXCEPT { -#if __has_builtin(__builtin_truncl) +# if __has_builtin(__builtin_truncl) return __builtin_truncl(__lcpp_x); -#else +# else return ::truncl(__lcpp_x); -#endif +# endif } +#endif // !_LIBCPP_HAS_NO_LONG_DOUBLE_MATH template inline _LIBCPP_INLINE_VISIBILITY Index: libcxx/test/std/depr/depr.c.headers/math_h.pass.cpp =================================================================== --- libcxx/test/std/depr/depr.c.headers/math_h.pass.cpp +++ libcxx/test/std/depr/depr.c.headers/math_h.pass.cpp @@ -113,8 +113,10 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert( (std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), @@ -148,9 +150,13 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); assert(acos(1) == 0); } @@ -167,9 +173,13 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); assert(asin(0) == 0); } @@ -186,9 +196,13 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); assert(atan(0) == 0); } @@ -198,19 +212,29 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); assert(atan2(0,1) == 0); @@ -228,9 +252,13 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); assert(ceil(0) == 0); } @@ -247,9 +275,13 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); assert(cos(0) == 1); } @@ -266,9 +298,13 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); assert(cosh(0) == 1); } @@ -285,9 +321,13 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); assert(exp(0) == 1); } @@ -304,9 +344,13 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); assert(fabs(-1) == 1); } @@ -323,9 +367,13 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); assert(floor(1) == 1); } @@ -335,19 +383,29 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); assert(fmod(1.5,1) == .5); @@ -366,9 +424,13 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); assert(frexp(0, &ip) == 0); } @@ -386,9 +448,13 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); assert(ldexp(1, ip) == 2); } @@ -405,9 +471,13 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); assert(log(1) == 0); } @@ -424,9 +494,13 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); assert(log10(1) == 0); } @@ -435,9 +509,13 @@ { static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); double i; assert(modf(1., &i) == 0); @@ -448,29 +526,43 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); // static_assert((std::is_same(), (int)0)), double>::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH // static_assert((std::is_same(), (float)0)), long double>::value), ""); +#endif // static_assert((std::is_same())), float>::value), ""); static_assert((std::is_same::value), ""); assert(pow(1,1) == 1); // assert(pow(Value(), Value()) == 1); // assert(pow(1.0f, Value()) == 1); // assert(pow(1.0, Value()) == 1); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH // assert(pow(Value(), 1LL) == 1); +#endif } void test_sin() @@ -485,9 +577,13 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); assert(sin(0) == 0); } @@ -504,9 +600,13 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); assert(sinh(0) == 0); } @@ -523,9 +623,13 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); assert(sqrt(4) == 2); } @@ -542,9 +646,13 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); assert(tan(0) == 0); } @@ -561,9 +669,13 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); assert(tanh(0) == 0); } @@ -576,7 +688,9 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); assert(signbit(-1.0) == true); } @@ -589,7 +703,9 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); assert(fpclassify(-1.0) == FP_NORMAL); } @@ -602,7 +718,9 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); assert(isfinite(-1.0) == true); } @@ -615,7 +733,9 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); assert(isnormal(-1.0) == true); } @@ -627,14 +747,18 @@ #endif static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); assert(isgreater(-1.0, 0.F) == false); } @@ -646,14 +770,18 @@ #endif static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); assert(isgreaterequal(-1.0, 0.F) == false); } @@ -677,7 +805,9 @@ #endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif assert(isinf(-1.0) == false); } @@ -688,14 +818,18 @@ #endif static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); assert(isless(-1.0, 0.F) == true); } @@ -707,14 +841,18 @@ #endif static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); assert(islessequal(-1.0, 0.F) == true); } @@ -726,14 +864,18 @@ #endif static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); assert(islessgreater(-1.0, 0.F) == true); } @@ -757,7 +899,9 @@ #endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif assert(isnan(-1.0) == false); } @@ -768,14 +912,18 @@ #endif static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); assert(isunordered(-1.0, 0.F) == false); } @@ -792,9 +940,13 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); assert(acosh(1) == 0); } @@ -811,9 +963,13 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); assert(asinh(0) == 0); } @@ -830,9 +986,13 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); assert(atanh(0) == 0); } @@ -854,10 +1014,14 @@ double>::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); assert(truncate_fp(cbrt(1)) == 1); @@ -869,19 +1033,29 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); assert(copysign(1,1) == 1); @@ -899,9 +1073,13 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); assert(erf(0) == 0); } @@ -918,9 +1096,13 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); assert(erfc(0) == 1); } @@ -937,9 +1119,13 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); assert(exp2(1) == 2); } @@ -956,9 +1142,13 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); assert(expm1(0) == 0); } @@ -968,19 +1158,29 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); assert(fdim(1,0) == 1); @@ -995,7 +1195,9 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); @@ -1005,9 +1207,12 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); @@ -1017,9 +1222,12 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); assert(fma(1,1,1) == 2); } @@ -1029,19 +1237,29 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); assert(fmax(1,0) == 1); @@ -1052,19 +1270,29 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); assert(fmin(1,0) == 0); @@ -1075,19 +1303,29 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); assert(hypot(3,4) == 5); @@ -1105,7 +1343,9 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); @@ -1124,9 +1364,13 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); assert(lgamma(1) == 0); } @@ -1143,7 +1387,9 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); @@ -1162,7 +1408,9 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); @@ -1181,9 +1429,13 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); assert(log1p(0) == 0); } @@ -1200,9 +1452,13 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); assert(log2(1) == 0); } @@ -1219,9 +1475,13 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); assert(logb(1) == 0); } @@ -1238,7 +1498,9 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); @@ -1257,7 +1519,9 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); @@ -1268,7 +1532,9 @@ { static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif } void test_nearbyint() @@ -1283,9 +1549,13 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); assert(nearbyint(1) == 1); } @@ -1295,19 +1565,29 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); assert(nextafter(0,1) == hexfloat(0x1, 0, -1074)); @@ -1315,6 +1595,7 @@ void test_nexttoward() { +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); @@ -1328,6 +1609,7 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); assert(nexttoward(0, 1) == hexfloat(0x1, 0, -1074)); } @@ -1337,19 +1619,29 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); assert(remainder(0.5,1) == 0.5); @@ -1361,19 +1653,29 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); assert(remquo(0.5,1, &ip) == 0.5); @@ -1391,9 +1693,13 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); assert(rint(1) == 1); } @@ -1410,9 +1716,13 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); assert(round(1) == 1); } @@ -1429,9 +1739,13 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); assert(scalbln(1, 1) == 2); } @@ -1448,9 +1762,13 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); assert(scalbn(1, 1) == 2); } @@ -1467,9 +1785,13 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); assert(tgamma(1) == 1); } @@ -1486,9 +1808,13 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); assert(trunc(1) == 1); } Index: libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_long_double.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_long_double.pass.cpp +++ libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_long_double.pass.cpp @@ -85,6 +85,7 @@ assert(err == ios.goodbit); assert(v == 125e-1); } +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH { const char str[] = "0x125p-1"; std::hex(ios); @@ -97,6 +98,7 @@ assert(err == ios.goodbit); assert(v == hexfloat(0x125, 0, -1)); } +#endif { const char str[] = "inf"; std::hex(ios); Index: libcxx/test/std/numerics/c.math/abs.pass.cpp =================================================================== --- libcxx/test/std/numerics/c.math/abs.pass.cpp +++ libcxx/test/std/numerics/c.math/abs.pass.cpp @@ -68,7 +68,9 @@ test_abs::type>(); test_abs::type>(); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH test_abs(); +#endif test_abs(); test_abs(); Index: libcxx/test/std/numerics/c.math/cmath.pass.cpp =================================================================== --- libcxx/test/std/numerics/c.math/cmath.pass.cpp +++ libcxx/test/std/numerics/c.math/cmath.pass.cpp @@ -118,7 +118,9 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); @@ -153,9 +155,13 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); assert(std::acos(1) == 0); } @@ -172,9 +178,13 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); assert(std::asin(0) == 0); } @@ -191,9 +201,13 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); assert(std::atan(0) == 0); } @@ -203,19 +217,29 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); assert(std::atan2(0,1) == 0); @@ -233,9 +257,13 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); assert(std::ceil(0) == 0); } @@ -252,9 +280,13 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); assert(std::cos(0) == 1); } @@ -271,9 +303,13 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); assert(std::cosh(0) == 1); } @@ -290,9 +326,13 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); assert(std::exp(0) == 1); } @@ -309,9 +349,13 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); assert(std::fabs(-1) == 1); } @@ -328,9 +372,13 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); assert(std::floor(1) == 1); } @@ -340,19 +388,29 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); assert(std::fmod(1.5,1) == .5); @@ -371,9 +429,13 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); assert(std::frexp(0, &ip) == 0); } @@ -391,9 +453,13 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); assert(std::ldexp(1, ip) == 2); } @@ -410,9 +476,13 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); assert(std::log(1) == 0); } @@ -429,9 +499,13 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); assert(std::log10(1) == 0); } @@ -440,9 +514,13 @@ { static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); double i; assert(std::modf(1., &i) == 0); @@ -453,29 +531,43 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); // static_assert((std::is_same(), (int)0)), double>::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH // static_assert((std::is_same(), (float)0)), long double>::value), ""); +#endif // static_assert((std::is_same())), float>::value), ""); static_assert((std::is_same::value), ""); assert(std::pow(1,1) == 1); // assert(std::pow(Value(), Value()) == 1); // assert(std::pow(1.0f, Value()) == 1); // assert(std::pow(1.0, Value()) == 1); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH // assert(std::pow(Value(), 1LL) == 1); +#endif } void test_sin() @@ -490,9 +582,13 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); assert(std::sin(0) == 0); } @@ -509,9 +605,13 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); assert(std::sinh(0) == 0); } @@ -528,9 +628,13 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); assert(std::sqrt(4) == 2); } @@ -547,9 +651,13 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); assert(std::tan(0) == 0); } @@ -566,9 +674,13 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); assert(std::tanh(0) == 0); } @@ -581,7 +693,9 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); assert(std::signbit(-1.0) == true); assert(std::signbit(0u) == false); @@ -601,7 +715,9 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); assert(std::fpclassify(-1.0) == FP_NORMAL); assert(std::fpclassify(0) == FP_ZERO); @@ -619,7 +735,9 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); assert(std::isfinite(-1.0) == true); assert(std::isfinite(0) == true); @@ -637,7 +755,9 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); assert(std::isnormal(-1.0) == true); assert(std::isnormal(0) == false); @@ -654,14 +774,18 @@ #endif static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); assert(std::isgreater(-1.0, 0.F) == false); } @@ -673,14 +797,18 @@ #endif static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); assert(std::isgreaterequal(-1.0, 0.F) == false); } @@ -705,7 +833,9 @@ #endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif assert(std::isinf(-1.0) == false); assert(std::isinf(0) == false); assert(std::isinf(1) == false); @@ -721,14 +851,18 @@ #endif static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); assert(std::isless(-1.0, 0.F) == true); } @@ -740,14 +874,18 @@ #endif static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); assert(std::islessequal(-1.0, 0.F) == true); } @@ -759,14 +897,18 @@ #endif static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); assert(std::islessgreater(-1.0, 0.F) == true); } @@ -791,7 +933,9 @@ #endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif assert(std::isnan(-1.0) == false); assert(std::isnan(0) == false); assert(std::isnan(1) == false); @@ -807,14 +951,18 @@ #endif static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); assert(std::isunordered(-1.0, 0.F) == false); } @@ -831,9 +979,13 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); assert(std::acosh(1) == 0); } @@ -850,9 +1002,13 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); assert(std::asinh(0) == 0); } @@ -869,9 +1025,13 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); assert(std::atanh(0) == 0); } @@ -888,9 +1048,13 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); assert(truncate_fp(std::cbrt(1)) == 1); } @@ -930,9 +1094,13 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); assert(std::erf(0) == 0); } @@ -949,9 +1117,13 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); assert(std::erfc(0) == 1); } @@ -968,9 +1140,13 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); assert(std::exp2(1) == 2); } @@ -987,9 +1163,13 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); assert(std::expm1(0) == 0); } @@ -999,19 +1179,29 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); assert(std::fdim(1,0) == 1); @@ -1026,7 +1216,9 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); @@ -1036,9 +1228,12 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); @@ -1048,9 +1243,12 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); assert(std::fma(1,1,1) == 2); } @@ -1060,19 +1258,29 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); assert(std::fmax(1,0) == 1); @@ -1083,19 +1291,29 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); assert(std::fmin(1,0) == 0); @@ -1106,19 +1324,29 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); assert(std::hypot(3,4) == 5); @@ -1127,16 +1355,24 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); @@ -1157,7 +1393,9 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); @@ -1172,16 +1410,24 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); @@ -1206,9 +1452,13 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); assert(std::lgamma(1) == 0); } @@ -1225,7 +1475,9 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); @@ -1244,7 +1496,9 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); @@ -1263,9 +1517,13 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); assert(std::log1p(0) == 0); } @@ -1282,9 +1540,13 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); assert(std::log2(1) == 0); } @@ -1301,9 +1563,13 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); assert(std::logb(1) == 0); } @@ -1320,7 +1586,9 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); @@ -1339,7 +1607,9 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); @@ -1350,7 +1620,9 @@ { static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif } void test_nearbyint() @@ -1365,9 +1637,13 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); assert(std::nearbyint(1) == 1); } @@ -1377,19 +1653,29 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); assert(std::nextafter(0,1) == hexfloat(0x1, 0, -1074)); @@ -1397,6 +1683,7 @@ void test_nexttoward() { +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); @@ -1410,6 +1697,7 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); assert(std::nexttoward(0, 1) == hexfloat(0x1, 0, -1074)); } @@ -1419,19 +1707,29 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); assert(std::remainder(0.5,1) == 0.5); @@ -1443,19 +1741,29 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); assert(std::remquo(0.5,1, &ip) == 0.5); @@ -1473,9 +1781,13 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); assert(std::rint(1) == 1); } @@ -1492,9 +1804,13 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); assert(std::round(1) == 1); } @@ -1511,9 +1827,13 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); assert(std::scalbln(1, 1) == 2); } @@ -1530,9 +1850,13 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); assert(std::scalbn(1, 1) == 2); } @@ -1549,9 +1873,13 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); assert(std::tgamma(1) == 1); } @@ -1568,9 +1896,13 @@ static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH static_assert((std::is_same::value), ""); +#endif static_assert((std::is_same::value), ""); assert(std::trunc(1) == 1); } Index: libcxx/test/std/numerics/complex.number/cmplx.over/arg.pass.cpp =================================================================== --- libcxx/test/std/numerics/complex.number/cmplx.over/arg.pass.cpp +++ libcxx/test/std/numerics/complex.number/cmplx.over/arg.pass.cpp @@ -48,7 +48,9 @@ { test(); test(); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH test(); +#endif test(); test(); test(); Index: libcxx/test/std/numerics/complex.number/cmplx.over/pow.pass.cpp =================================================================== --- libcxx/test/std/numerics/complex.number/cmplx.over/pow.pass.cpp +++ libcxx/test/std/numerics/complex.number/cmplx.over/pow.pass.cpp @@ -83,24 +83,34 @@ { test(); test(); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH test(); +#endif test(); test(); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH test(); +#endif test(); test(); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH test(); +#endif test(); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH test(); +#endif test(); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH test(); test(); test(); +#endif return 0; } Index: libcxx/test/std/numerics/complex.number/complex.member.ops/divide_equal_complex.pass.cpp =================================================================== --- libcxx/test/std/numerics/complex.number/complex.member.ops/divide_equal_complex.pass.cpp +++ libcxx/test/std/numerics/complex.number/complex.member.ops/divide_equal_complex.pass.cpp @@ -50,7 +50,9 @@ { test(); test(); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH test(); +#endif return 0; } Index: libcxx/test/std/numerics/complex.number/complex.ops/complex_divide_complex.pass.cpp =================================================================== --- libcxx/test/std/numerics/complex.number/complex.ops/complex_divide_complex.pass.cpp +++ libcxx/test/std/numerics/complex.number/complex.ops/complex_divide_complex.pass.cpp @@ -154,7 +154,9 @@ { test(); test(); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH test(); +#endif test_edges(); return 0; Index: libcxx/test/std/numerics/complex.number/complex.ops/scalar_divide_complex.pass.cpp =================================================================== --- libcxx/test/std/numerics/complex.number/complex.ops/scalar_divide_complex.pass.cpp +++ libcxx/test/std/numerics/complex.number/complex.ops/scalar_divide_complex.pass.cpp @@ -38,7 +38,9 @@ { test(); test(); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH test(); +#endif return 0; } Index: libcxx/test/std/numerics/complex.number/complex.transcendentals/acos.pass.cpp =================================================================== --- libcxx/test/std/numerics/complex.number/complex.transcendentals/acos.pass.cpp +++ libcxx/test/std/numerics/complex.number/complex.transcendentals/acos.pass.cpp @@ -134,7 +134,9 @@ { test(); test(); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH test(); +#endif test_edges(); return 0; Index: libcxx/test/std/numerics/complex.number/complex.transcendentals/acosh.pass.cpp =================================================================== --- libcxx/test/std/numerics/complex.number/complex.transcendentals/acosh.pass.cpp +++ libcxx/test/std/numerics/complex.number/complex.transcendentals/acosh.pass.cpp @@ -145,7 +145,9 @@ { test(); test(); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH test(); +#endif test_edges(); return 0; Index: libcxx/test/std/numerics/complex.number/complex.transcendentals/asin.pass.cpp =================================================================== --- libcxx/test/std/numerics/complex.number/complex.transcendentals/asin.pass.cpp +++ libcxx/test/std/numerics/complex.number/complex.transcendentals/asin.pass.cpp @@ -113,7 +113,9 @@ { test(); test(); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH test(); +#endif test_edges(); return 0; Index: libcxx/test/std/numerics/complex.number/complex.transcendentals/asinh.pass.cpp =================================================================== --- libcxx/test/std/numerics/complex.number/complex.transcendentals/asinh.pass.cpp +++ libcxx/test/std/numerics/complex.number/complex.transcendentals/asinh.pass.cpp @@ -122,7 +122,9 @@ { test(); test(); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH test(); +#endif test_edges(); return 0; Index: libcxx/test/std/numerics/complex.number/complex.transcendentals/atan.pass.cpp =================================================================== --- libcxx/test/std/numerics/complex.number/complex.transcendentals/atan.pass.cpp +++ libcxx/test/std/numerics/complex.number/complex.transcendentals/atan.pass.cpp @@ -62,7 +62,9 @@ { test(); test(); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH test(); +#endif test_edges(); return 0; Index: libcxx/test/std/numerics/complex.number/complex.transcendentals/atanh.pass.cpp =================================================================== --- libcxx/test/std/numerics/complex.number/complex.transcendentals/atanh.pass.cpp +++ libcxx/test/std/numerics/complex.number/complex.transcendentals/atanh.pass.cpp @@ -126,7 +126,9 @@ { test(); test(); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH test(); +#endif test_edges(); return 0; Index: libcxx/test/std/numerics/complex.number/complex.transcendentals/cos.pass.cpp =================================================================== --- libcxx/test/std/numerics/complex.number/complex.transcendentals/cos.pass.cpp +++ libcxx/test/std/numerics/complex.number/complex.transcendentals/cos.pass.cpp @@ -61,7 +61,9 @@ { test(); test(); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH test(); +#endif test_edges(); return 0; Index: libcxx/test/std/numerics/complex.number/complex.transcendentals/cosh.pass.cpp =================================================================== --- libcxx/test/std/numerics/complex.number/complex.transcendentals/cosh.pass.cpp +++ libcxx/test/std/numerics/complex.number/complex.transcendentals/cosh.pass.cpp @@ -111,7 +111,9 @@ { test(); test(); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH test(); +#endif test_edges(); return 0; Index: libcxx/test/std/numerics/complex.number/complex.transcendentals/exp.pass.cpp =================================================================== --- libcxx/test/std/numerics/complex.number/complex.transcendentals/exp.pass.cpp +++ libcxx/test/std/numerics/complex.number/complex.transcendentals/exp.pass.cpp @@ -113,7 +113,9 @@ { test(); test(); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH test(); +#endif test_edges(); return 0; Index: libcxx/test/std/numerics/complex.number/complex.transcendentals/log.pass.cpp =================================================================== --- libcxx/test/std/numerics/complex.number/complex.transcendentals/log.pass.cpp +++ libcxx/test/std/numerics/complex.number/complex.transcendentals/log.pass.cpp @@ -126,7 +126,9 @@ { test(); test(); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH test(); +#endif test_edges(); return 0; Index: libcxx/test/std/numerics/complex.number/complex.transcendentals/log10.pass.cpp =================================================================== --- libcxx/test/std/numerics/complex.number/complex.transcendentals/log10.pass.cpp +++ libcxx/test/std/numerics/complex.number/complex.transcendentals/log10.pass.cpp @@ -60,7 +60,9 @@ { test(); test(); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH test(); +#endif test_edges(); return 0; Index: libcxx/test/std/numerics/complex.number/complex.transcendentals/pow_complex_complex.pass.cpp =================================================================== --- libcxx/test/std/numerics/complex.number/complex.transcendentals/pow_complex_complex.pass.cpp +++ libcxx/test/std/numerics/complex.number/complex.transcendentals/pow_complex_complex.pass.cpp @@ -65,7 +65,9 @@ { test(); test(); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH test(); +#endif test_edges(); return 0; Index: libcxx/test/std/numerics/complex.number/complex.transcendentals/pow_complex_scalar.pass.cpp =================================================================== --- libcxx/test/std/numerics/complex.number/complex.transcendentals/pow_complex_scalar.pass.cpp +++ libcxx/test/std/numerics/complex.number/complex.transcendentals/pow_complex_scalar.pass.cpp @@ -63,7 +63,9 @@ { test(); test(); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH test(); +#endif test_edges(); return 0; Index: libcxx/test/std/numerics/complex.number/complex.transcendentals/pow_scalar_complex.pass.cpp =================================================================== --- libcxx/test/std/numerics/complex.number/complex.transcendentals/pow_scalar_complex.pass.cpp +++ libcxx/test/std/numerics/complex.number/complex.transcendentals/pow_scalar_complex.pass.cpp @@ -63,7 +63,9 @@ { test(); test(); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH test(); +#endif test_edges(); return 0; Index: libcxx/test/std/numerics/complex.number/complex.transcendentals/sin.pass.cpp =================================================================== --- libcxx/test/std/numerics/complex.number/complex.transcendentals/sin.pass.cpp +++ libcxx/test/std/numerics/complex.number/complex.transcendentals/sin.pass.cpp @@ -62,7 +62,9 @@ { test(); test(); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH test(); +#endif test_edges(); return 0; Index: libcxx/test/std/numerics/complex.number/complex.transcendentals/sinh.pass.cpp =================================================================== --- libcxx/test/std/numerics/complex.number/complex.transcendentals/sinh.pass.cpp +++ libcxx/test/std/numerics/complex.number/complex.transcendentals/sinh.pass.cpp @@ -112,7 +112,9 @@ { test(); test(); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH test(); +#endif test_edges(); return 0; Index: libcxx/test/std/numerics/complex.number/complex.transcendentals/sqrt.pass.cpp =================================================================== --- libcxx/test/std/numerics/complex.number/complex.transcendentals/sqrt.pass.cpp +++ libcxx/test/std/numerics/complex.number/complex.transcendentals/sqrt.pass.cpp @@ -104,7 +104,9 @@ { test(); test(); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH test(); +#endif test_edges(); return 0; Index: libcxx/test/std/numerics/complex.number/complex.transcendentals/tan.pass.cpp =================================================================== --- libcxx/test/std/numerics/complex.number/complex.transcendentals/tan.pass.cpp +++ libcxx/test/std/numerics/complex.number/complex.transcendentals/tan.pass.cpp @@ -63,7 +63,9 @@ { test(); test(); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH test(); +#endif test_edges(); return 0; Index: libcxx/test/std/numerics/complex.number/complex.transcendentals/tanh.pass.cpp =================================================================== --- libcxx/test/std/numerics/complex.number/complex.transcendentals/tanh.pass.cpp +++ libcxx/test/std/numerics/complex.number/complex.transcendentals/tanh.pass.cpp @@ -94,7 +94,9 @@ { test(); test(); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH test(); +#endif test_edges(); return 0; Index: libcxx/test/std/numerics/complex.number/complex.value.ops/abs.pass.cpp =================================================================== --- libcxx/test/std/numerics/complex.number/complex.value.ops/abs.pass.cpp +++ libcxx/test/std/numerics/complex.number/complex.value.ops/abs.pass.cpp @@ -58,7 +58,9 @@ { test(); test(); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH test(); +#endif test_edges(); return 0; Index: libcxx/test/std/numerics/complex.number/complex.value.ops/arg.pass.cpp =================================================================== --- libcxx/test/std/numerics/complex.number/complex.value.ops/arg.pass.cpp +++ libcxx/test/std/numerics/complex.number/complex.value.ops/arg.pass.cpp @@ -130,7 +130,9 @@ { test(); test(); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH test(); +#endif test_edges(); return 0; Index: libcxx/test/std/numerics/complex.number/complex.value.ops/polar.pass.cpp =================================================================== --- libcxx/test/std/numerics/complex.number/complex.value.ops/polar.pass.cpp +++ libcxx/test/std/numerics/complex.number/complex.value.ops/polar.pass.cpp @@ -107,7 +107,9 @@ { test(); test(); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH test(); +#endif test_edges(); return 0; Index: libcxx/test/std/numerics/numeric.ops/numeric.ops.midpoint/midpoint.float.pass.cpp =================================================================== --- libcxx/test/std/numerics/numeric.ops/numeric.ops.midpoint/midpoint.float.pass.cpp +++ libcxx/test/std/numerics/numeric.ops/numeric.ops.midpoint/midpoint.float.pass.cpp @@ -128,7 +128,9 @@ { fp_test(); fp_test(); +#ifndef TEST_HAS_NO_LONG_DOUBLE_MATH fp_test(); +#endif return 0; } Index: libcxx/test/support/test_macros.h =================================================================== --- libcxx/test/support/test_macros.h +++ libcxx/test/support/test_macros.h @@ -361,6 +361,10 @@ # define TEST_HAS_NO_WIDE_CHARACTERS #endif +#if defined(_LIBCPP_HAS_NO_LONG_DOUBLE_MATH) +# define TEST_HAS_NO_LONG_DOUBLE_MATH +#endif + #if defined(_LIBCPP_HAS_NO_UNICODE) # define TEST_HAS_NO_UNICODE #elif defined(_MSVC_EXECUTION_CHARACTER_SET) && _MSVC_EXECUTION_CHARACTER_SET != 65001 Index: libcxx/utils/ci/buildkite-pipeline.yml =================================================================== --- libcxx/utils/ci/buildkite-pipeline.yml +++ libcxx/utils/ci/buildkite-pipeline.yml @@ -607,6 +607,20 @@ limit: 2 timeout_in_minutes: 120 + - label: "No long double math" + command: "libcxx/utils/ci/run-buildbot generic-no-long-double-math" + artifact_paths: + - "**/test-results.xml" + - "**/*.abilist" + agents: + queue: "libcxx-builders" + os: "linux" + retry: + automatic: + - exit_status: -1 # Agent was lost + limit: 2 + timeout_in_minutes: 120 + - label: "No experimental features" command: "libcxx/utils/ci/run-buildbot generic-no-experimental" artifact_paths: Index: libcxx/utils/ci/run-buildbot =================================================================== --- libcxx/utils/ci/run-buildbot +++ libcxx/utils/ci/run-buildbot @@ -347,6 +347,11 @@ generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-no-wide-characters.cmake" check-runtimes ;; +generic-no-long-double-math) + clean + generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-no-long-double-math.cmake" + check-runtimes +;; generic-no-experimental) clean generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-no-experimental.cmake" Index: libcxx/utils/libcxx/test/features.py =================================================================== --- libcxx/utils/libcxx/test/features.py +++ libcxx/utils/libcxx/test/features.py @@ -207,6 +207,7 @@ '_LIBCPP_HAS_NO_RANDOM_DEVICE': 'no-random-device', '_LIBCPP_HAS_NO_LOCALIZATION': 'no-localization', '_LIBCPP_HAS_NO_WIDE_CHARACTERS': 'no-wide-characters', + '_LIBCPP_HAS_NO_LONG_DOUBLE_MATH': 'no-long-double-math', '_LIBCPP_HAS_NO_UNICODE': 'libcpp-has-no-unicode', '_LIBCPP_ENABLE_DEBUG_MODE': 'libcpp-has-debug-mode', } Index: llvm/utils/gn/secondary/libcxx/include/BUILD.gn =================================================================== --- llvm/utils/gn/secondary/libcxx/include/BUILD.gn +++ llvm/utils/gn/secondary/libcxx/include/BUILD.gn @@ -35,6 +35,7 @@ "_LIBCPP_HAS_NO_RANDOM_DEVICE=", "_LIBCPP_HAS_NO_LOCALIZATION=", "_LIBCPP_HAS_NO_WIDE_CHARACTERS=", + "_LIBCPP_HAS_NO_LONG_DOUBLE_MATH=", "_LIBCPP_ABI_DEFINES=", "_LIBCPP_ENABLE_ASSERTIONS_DEFAULT=", "_LIBCPP_ENABLE_DEBUG_MODE=",