@@ -997,14 +997,14 @@ conj(_Tp __re) {
997
997
template <class _Tp >
998
998
inline _LIBCPP_HIDE_FROM_ABI complex<_Tp> proj (const complex<_Tp>& __c) {
999
999
complex<_Tp> __r = __c;
1000
- if (std::__constexpr_isinf (__c.real ()) || std::__constexpr_isinf (__c.imag ()))
1000
+ if (std::isinf (__c.real ()) || std::isinf (__c.imag ()))
1001
1001
__r = complex<_Tp>(INFINITY, std::copysign (_Tp (0 ), __c.imag ()));
1002
1002
return __r;
1003
1003
}
1004
1004
1005
1005
template <class _Tp , __enable_if_t <is_floating_point<_Tp>::value, int > = 0 >
1006
1006
inline _LIBCPP_HIDE_FROM_ABI typename __libcpp_complex_overload_traits<_Tp>::_ComplexType proj (_Tp __re) {
1007
- if (std::__constexpr_isinf (__re))
1007
+ if (std::isinf (__re))
1008
1008
__re = std::abs (__re);
1009
1009
return complex<_Tp>(__re);
1010
1010
}
@@ -1022,12 +1022,12 @@ _LIBCPP_HIDE_FROM_ABI complex<_Tp> polar(const _Tp& __rho, const _Tp& __theta =
1022
1022
if (std::isnan (__rho) || std::signbit (__rho))
1023
1023
return complex<_Tp>(_Tp (NAN), _Tp (NAN));
1024
1024
if (std::isnan (__theta)) {
1025
- if (std::__constexpr_isinf (__rho))
1025
+ if (std::isinf (__rho))
1026
1026
return complex<_Tp>(__rho, __theta);
1027
1027
return complex<_Tp>(__theta, __theta);
1028
1028
}
1029
- if (std::__constexpr_isinf (__theta)) {
1030
- if (std::__constexpr_isinf (__rho))
1029
+ if (std::isinf (__theta)) {
1030
+ if (std::isinf (__rho))
1031
1031
return complex<_Tp>(__rho, _Tp (NAN));
1032
1032
return complex<_Tp>(_Tp (NAN), _Tp (NAN));
1033
1033
}
@@ -1058,9 +1058,9 @@ inline _LIBCPP_HIDE_FROM_ABI complex<_Tp> log10(const complex<_Tp>& __x) {
1058
1058
1059
1059
template <class _Tp >
1060
1060
_LIBCPP_HIDE_FROM_ABI complex<_Tp> sqrt (const complex<_Tp>& __x) {
1061
- if (std::__constexpr_isinf (__x.imag ()))
1061
+ if (std::isinf (__x.imag ()))
1062
1062
return complex<_Tp>(_Tp (INFINITY), __x.imag ());
1063
- if (std::__constexpr_isinf (__x.real ())) {
1063
+ if (std::isinf (__x.real ())) {
1064
1064
if (__x.real () > _Tp (0 ))
1065
1065
return complex<_Tp>(__x.real (), std::isnan (__x.imag ()) ? __x.imag () : std::copysign (_Tp (0 ), __x.imag ()));
1066
1066
return complex<_Tp>(std::isnan (__x.imag ()) ? __x.imag () : _Tp (0 ), std::copysign (__x.real (), __x.imag ()));
@@ -1076,12 +1076,12 @@ _LIBCPP_HIDE_FROM_ABI complex<_Tp> exp(const complex<_Tp>& __x) {
1076
1076
if (__i == 0 ) {
1077
1077
return complex<_Tp>(std::exp (__x.real ()), std::copysign (_Tp (0 ), __x.imag ()));
1078
1078
}
1079
- if (std::__constexpr_isinf (__x.real ())) {
1079
+ if (std::isinf (__x.real ())) {
1080
1080
if (__x.real () < _Tp (0 )) {
1081
1081
if (!std::isfinite (__i))
1082
1082
__i = _Tp (1 );
1083
1083
} else if (__i == 0 || !std::isfinite (__i)) {
1084
- if (std::__constexpr_isinf (__i))
1084
+ if (std::isinf (__i))
1085
1085
__i = _Tp (NAN);
1086
1086
return complex<_Tp>(__x.real (), __i);
1087
1087
}
@@ -1128,21 +1128,21 @@ inline _LIBCPP_HIDE_FROM_ABI complex<_Tp> __sqr(const complex<_Tp>& __x) {
1128
1128
template <class _Tp >
1129
1129
_LIBCPP_HIDE_FROM_ABI complex<_Tp> asinh (const complex<_Tp>& __x) {
1130
1130
const _Tp __pi (atan2 (+0 ., -0 .));
1131
- if (std::__constexpr_isinf (__x.real ())) {
1131
+ if (std::isinf (__x.real ())) {
1132
1132
if (std::isnan (__x.imag ()))
1133
1133
return __x;
1134
- if (std::__constexpr_isinf (__x.imag ()))
1134
+ if (std::isinf (__x.imag ()))
1135
1135
return complex<_Tp>(__x.real (), std::copysign (__pi * _Tp (0.25 ), __x.imag ()));
1136
1136
return complex<_Tp>(__x.real (), std::copysign (_Tp (0 ), __x.imag ()));
1137
1137
}
1138
1138
if (std::isnan (__x.real ())) {
1139
- if (std::__constexpr_isinf (__x.imag ()))
1139
+ if (std::isinf (__x.imag ()))
1140
1140
return complex<_Tp>(__x.imag (), __x.real ());
1141
1141
if (__x.imag () == 0 )
1142
1142
return __x;
1143
1143
return complex<_Tp>(__x.real (), __x.real ());
1144
1144
}
1145
- if (std::__constexpr_isinf (__x.imag ()))
1145
+ if (std::isinf (__x.imag ()))
1146
1146
return complex<_Tp>(std::copysign (__x.imag (), __x.real ()), std::copysign (__pi / _Tp (2 ), __x.imag ()));
1147
1147
complex<_Tp> __z = std::log (__x + std::sqrt (std::__sqr (__x) + _Tp (1 )));
1148
1148
return complex<_Tp>(std::copysign (__z.real (), __x.real ()), std::copysign (__z.imag (), __x.imag ()));
@@ -1153,10 +1153,10 @@ _LIBCPP_HIDE_FROM_ABI complex<_Tp> asinh(const complex<_Tp>& __x) {
1153
1153
template <class _Tp >
1154
1154
_LIBCPP_HIDE_FROM_ABI complex<_Tp> acosh (const complex<_Tp>& __x) {
1155
1155
const _Tp __pi (atan2 (+0 ., -0 .));
1156
- if (std::__constexpr_isinf (__x.real ())) {
1156
+ if (std::isinf (__x.real ())) {
1157
1157
if (std::isnan (__x.imag ()))
1158
1158
return complex<_Tp>(std::abs (__x.real ()), __x.imag ());
1159
- if (std::__constexpr_isinf (__x.imag ())) {
1159
+ if (std::isinf (__x.imag ())) {
1160
1160
if (__x.real () > 0 )
1161
1161
return complex<_Tp>(__x.real (), std::copysign (__pi * _Tp (0.25 ), __x.imag ()));
1162
1162
else
@@ -1167,11 +1167,11 @@ _LIBCPP_HIDE_FROM_ABI complex<_Tp> acosh(const complex<_Tp>& __x) {
1167
1167
return complex<_Tp>(__x.real (), std::copysign (_Tp (0 ), __x.imag ()));
1168
1168
}
1169
1169
if (std::isnan (__x.real ())) {
1170
- if (std::__constexpr_isinf (__x.imag ()))
1170
+ if (std::isinf (__x.imag ()))
1171
1171
return complex<_Tp>(std::abs (__x.imag ()), __x.real ());
1172
1172
return complex<_Tp>(__x.real (), __x.real ());
1173
1173
}
1174
- if (std::__constexpr_isinf (__x.imag ()))
1174
+ if (std::isinf (__x.imag ()))
1175
1175
return complex<_Tp>(std::abs (__x.imag ()), std::copysign (__pi / _Tp (2 ), __x.imag ()));
1176
1176
complex<_Tp> __z = std::log (__x + std::sqrt (std::__sqr (__x) - _Tp (1 )));
1177
1177
return complex<_Tp>(std::copysign (__z.real (), _Tp (0 )), std::copysign (__z.imag (), __x.imag ()));
@@ -1182,18 +1182,18 @@ _LIBCPP_HIDE_FROM_ABI complex<_Tp> acosh(const complex<_Tp>& __x) {
1182
1182
template <class _Tp >
1183
1183
_LIBCPP_HIDE_FROM_ABI complex<_Tp> atanh (const complex<_Tp>& __x) {
1184
1184
const _Tp __pi (atan2 (+0 ., -0 .));
1185
- if (std::__constexpr_isinf (__x.imag ())) {
1185
+ if (std::isinf (__x.imag ())) {
1186
1186
return complex<_Tp>(std::copysign (_Tp (0 ), __x.real ()), std::copysign (__pi / _Tp (2 ), __x.imag ()));
1187
1187
}
1188
1188
if (std::isnan (__x.imag ())) {
1189
- if (std::__constexpr_isinf (__x.real ()) || __x.real () == 0 )
1189
+ if (std::isinf (__x.real ()) || __x.real () == 0 )
1190
1190
return complex<_Tp>(std::copysign (_Tp (0 ), __x.real ()), __x.imag ());
1191
1191
return complex<_Tp>(__x.imag (), __x.imag ());
1192
1192
}
1193
1193
if (std::isnan (__x.real ())) {
1194
1194
return complex<_Tp>(__x.real (), __x.real ());
1195
1195
}
1196
- if (std::__constexpr_isinf (__x.real ())) {
1196
+ if (std::isinf (__x.real ())) {
1197
1197
return complex<_Tp>(std::copysign (_Tp (0 ), __x.real ()), std::copysign (__pi / _Tp (2 ), __x.imag ()));
1198
1198
}
1199
1199
if (std::abs (__x.real ()) == _Tp (1 ) && __x.imag () == _Tp (0 )) {
@@ -1207,7 +1207,7 @@ _LIBCPP_HIDE_FROM_ABI complex<_Tp> atanh(const complex<_Tp>& __x) {
1207
1207
1208
1208
template <class _Tp >
1209
1209
_LIBCPP_HIDE_FROM_ABI complex<_Tp> sinh (const complex<_Tp>& __x) {
1210
- if (std::__constexpr_isinf (__x.real ()) && !std::isfinite (__x.imag ()))
1210
+ if (std::isinf (__x.real ()) && !std::isfinite (__x.imag ()))
1211
1211
return complex<_Tp>(__x.real (), _Tp (NAN));
1212
1212
if (__x.real () == 0 && !std::isfinite (__x.imag ()))
1213
1213
return complex<_Tp>(__x.real (), _Tp (NAN));
@@ -1220,7 +1220,7 @@ _LIBCPP_HIDE_FROM_ABI complex<_Tp> sinh(const complex<_Tp>& __x) {
1220
1220
1221
1221
template <class _Tp >
1222
1222
_LIBCPP_HIDE_FROM_ABI complex<_Tp> cosh (const complex<_Tp>& __x) {
1223
- if (std::__constexpr_isinf (__x.real ()) && !std::isfinite (__x.imag ()))
1223
+ if (std::isinf (__x.real ()) && !std::isfinite (__x.imag ()))
1224
1224
return complex<_Tp>(std::abs (__x.real ()), _Tp (NAN));
1225
1225
if (__x.real () == 0 && !std::isfinite (__x.imag ()))
1226
1226
return complex<_Tp>(_Tp (NAN), __x.real ());
@@ -1235,7 +1235,7 @@ _LIBCPP_HIDE_FROM_ABI complex<_Tp> cosh(const complex<_Tp>& __x) {
1235
1235
1236
1236
template <class _Tp >
1237
1237
_LIBCPP_HIDE_FROM_ABI complex<_Tp> tanh (const complex<_Tp>& __x) {
1238
- if (std::__constexpr_isinf (__x.real ())) {
1238
+ if (std::isinf (__x.real ())) {
1239
1239
if (!std::isfinite (__x.imag ()))
1240
1240
return complex<_Tp>(std::copysign (_Tp (1 ), __x.real ()), _Tp (0 ));
1241
1241
return complex<_Tp>(std::copysign (_Tp (1 ), __x.real ()), std::copysign (_Tp (0 ), std::sin (_Tp (2 ) * __x.imag ())));
@@ -1246,7 +1246,7 @@ _LIBCPP_HIDE_FROM_ABI complex<_Tp> tanh(const complex<_Tp>& __x) {
1246
1246
_Tp __2i (_Tp (2 ) * __x.imag ());
1247
1247
_Tp __d (std::cosh (__2r) + std::cos (__2i));
1248
1248
_Tp __2rsh (std::sinh (__2r));
1249
- if (std::__constexpr_isinf (__2rsh) && std::__constexpr_isinf (__d))
1249
+ if (std::isinf (__2rsh) && std::isinf (__d))
1250
1250
return complex<_Tp>(__2rsh > _Tp (0 ) ? _Tp (1 ) : _Tp (-1 ), __2i > _Tp (0 ) ? _Tp (0 ) : _Tp (-0 .));
1251
1251
return complex<_Tp>(__2rsh / __d, std::sin (__2i) / __d);
1252
1252
}
@@ -1264,10 +1264,10 @@ _LIBCPP_HIDE_FROM_ABI complex<_Tp> asin(const complex<_Tp>& __x) {
1264
1264
template <class _Tp >
1265
1265
_LIBCPP_HIDE_FROM_ABI complex<_Tp> acos (const complex<_Tp>& __x) {
1266
1266
const _Tp __pi (atan2 (+0 ., -0 .));
1267
- if (std::__constexpr_isinf (__x.real ())) {
1267
+ if (std::isinf (__x.real ())) {
1268
1268
if (std::isnan (__x.imag ()))
1269
1269
return complex<_Tp>(__x.imag (), __x.real ());
1270
- if (std::__constexpr_isinf (__x.imag ())) {
1270
+ if (std::isinf (__x.imag ())) {
1271
1271
if (__x.real () < _Tp (0 ))
1272
1272
return complex<_Tp>(_Tp (0.75 ) * __pi, -__x.imag ());
1273
1273
return complex<_Tp>(_Tp (0.25 ) * __pi, -__x.imag ());
@@ -1277,11 +1277,11 @@ _LIBCPP_HIDE_FROM_ABI complex<_Tp> acos(const complex<_Tp>& __x) {
1277
1277
return complex<_Tp>(_Tp (0 ), std::signbit (__x.imag ()) ? __x.real () : -__x.real ());
1278
1278
}
1279
1279
if (std::isnan (__x.real ())) {
1280
- if (std::__constexpr_isinf (__x.imag ()))
1280
+ if (std::isinf (__x.imag ()))
1281
1281
return complex<_Tp>(__x.real (), -__x.imag ());
1282
1282
return complex<_Tp>(__x.real (), __x.real ());
1283
1283
}
1284
- if (std::__constexpr_isinf (__x.imag ()))
1284
+ if (std::isinf (__x.imag ()))
1285
1285
return complex<_Tp>(__pi / _Tp (2 ), -__x.imag ());
1286
1286
if (__x.real () == 0 && (__x.imag () == 0 || std::isnan (__x.imag ())))
1287
1287
return complex<_Tp>(__pi / _Tp (2 ), -__x.imag ());
0 commit comments