From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 894523882170 for ; Wed, 17 May 2023 19:15:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 894523882170 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1684350927; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=I42+gxm8DKfchP3fWY0iRzA5Jz882VVoME8zs6ucjJs=; b=JDrNBBBuesXB4pRptofNTIq6D8gUcIFUKrXErw6anjJ12wbSs/J99d1B8jH+VE18NkmDna lWvJH4hB80VzpUFfBCNmjz6/Q3sreVFeHPotDgpLClFnLUNIBMlAZzhn0RiLbVEVCVn20e iMpXIGJZpVBvRFSli4aIyMjmEJ9rcF8= Received: from mail-lj1-f200.google.com (mail-lj1-f200.google.com [209.85.208.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-56-EcOJ0980PaKzTIQoQrpyHQ-1; Wed, 17 May 2023 15:15:25 -0400 X-MC-Unique: EcOJ0980PaKzTIQoQrpyHQ-1 Received: by mail-lj1-f200.google.com with SMTP id 38308e7fff4ca-2aed331e597so2936811fa.0 for ; Wed, 17 May 2023 12:15:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684350923; x=1686942923; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=I42+gxm8DKfchP3fWY0iRzA5Jz882VVoME8zs6ucjJs=; b=blK1dnKqXSSHV46lmnnYcMnPVyWu23tY3N3df1RnWHGfXwkuuNzCuuAxjSduxmeRN1 IeCwX6l3uleiRXMqBQIqS9E1w/+62XfQ5E9RehT1MeOLot22z+5zbvbjkP/nuN6jAfrY ve9JUpBhpAV2y0/ST/ggWBm02Vqax4+XZbFQ2AF58ryLHV3O0Y6+N7NjK1edOYuJnudT igWJ1GB5m8SUl/LOZPq0UNwPHxAuLUc/eEsps1aJdRhQxOffv4vSTMEM0CaR5D8nzZh6 VRzc5SNY8rAKKfZiJr3a6RnwISpDvZMyjada+1KbDbkTwt6P9QY1aQdvyBBi2Qutv58s PhxA== X-Gm-Message-State: AC+VfDyjRn5osXqkKopUuFVp3YYy6s6TxwQnWy5/UStVEYIlszZSLLf8 a45uqC2FRdZYFm+r4o2/wntJ9N4oSUdrPjSNb5Yjyv8Q+VmgWBvWciGpd2aVcA9MOONfH1DGhKg qbj4eAj54QGzDwCp87Gl/+YyteGobN+k= X-Received: by 2002:a2e:88cc:0:b0:2aa:e7cd:69f8 with SMTP id a12-20020a2e88cc000000b002aae7cd69f8mr1096310ljk.9.1684350923735; Wed, 17 May 2023 12:15:23 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ44N5lolTZoBkKahkDZgXZSoIEVCS2xqe2UIxUmG8nDINMILHz9eYXFg2Mq+goosA0oFx0ZVHYCGR7qzlHspu0= X-Received: by 2002:a2e:88cc:0:b0:2aa:e7cd:69f8 with SMTP id a12-20020a2e88cc000000b002aae7cd69f8mr1096303ljk.9.1684350923334; Wed, 17 May 2023 12:15:23 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Jonathan Wakely Date: Wed, 17 May 2023 20:15:07 +0100 Message-ID: Subject: Re: [PATCH] libstdc++: Fix up some templates [PR109883] To: Jakub Jelinek Cc: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: multipart/alternative; boundary="00000000000076752405fbe8827a" X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,HTML_MESSAGE,KAM_SHORT,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: --00000000000076752405fbe8827a Content-Type: text/plain; charset="UTF-8" On Wed, 17 May 2023 at 19:18, Jakub Jelinek wrote: > Hi! > > As can be seen on the following testcase, for > > std::{atan2,fmod,pow,copysign,fdim,fmax,fmin,hypot,nextafter,remainder,remquo,fma} > if one operand type is std::float{16,32,64,128}_t or std::bfloat16_t and > another one some integral type or some other floating point type which > promotes to the other operand's type, we can end up with endless recursion. > This is because of a declaration ordering problem in , where the > float, double and long double overloads of those functions come before > the templates which use __gnu_cxx::__promote_{2,3}, but the > std::float{16,32,64,128}_t and std::bfloat16_t overloads come later in the > file. If the result of those promotions is _Float{16,32,64,128} or > __gnu_cxx::__bfloat16_t, say std::pow(_Float64, int) calls > std::pow(_Float64, _Float64) and the latter calls itself. > > The following patch fixes that by moving those templates later in the file, > so that the calls from those templates see also the other overloads. > I checked that each set of moved functions is still within the same #if group, so there's no change in the logic for whether they are defined or not, only the point of declaration within the file. I think other templates in the file like e.g. isgreater etc. shouldn't be > a problem, because those just use __builtin_isgreater etc. in their bodies. > > Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk/13.2? > OK for both, thanks. > > 2023-05-17 Jakub Jelinek > > PR libstdc++/109883 > * include/c_global/cmath (atan2, fmod, pow): Move > __gnu_cxx::__promote_2 using templates after _Float{16,32,64,128} > and > __gnu_cxx::__bfloat16_t overloads. > (copysign, fdim, fmax, fmin, hypot, nextafter, remainder, remquo): > Likewise. > (fma): Move __gnu_cxx::__promote_3 using template after > _Float{16,32,64,128} and __gnu_cxx::__bfloat16_t overloads. > > * testsuite/26_numerics/headers/cmath/constexpr_std_c++23.cc: New > test. > > --- libstdc++-v3/include/c_global/cmath.jj 2023-01-16 > 23:19:06.225717615 +0100 > +++ libstdc++-v3/include/c_global/cmath 2023-05-17 15:07:07.823657320 +0200 > @@ -151,15 +151,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION > { return __builtin_atan2l(__y, __x); } > #endif > > - template > - inline _GLIBCXX_CONSTEXPR > - typename __gnu_cxx::__promote_2<_Tp, _Up>::__type > - atan2(_Tp __y, _Up __x) > - { > - typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; > - return atan2(__type(__y), __type(__x)); > - } > - > using ::ceil; > > #ifndef __CORRECT_ISO_CPP_MATH_H_PROTO > @@ -286,15 +277,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION > { return __builtin_fmodl(__x, __y); } > #endif > > - template > - inline _GLIBCXX_CONSTEXPR > - typename __gnu_cxx::__promote_2<_Tp, _Up>::__type > - fmod(_Tp __x, _Up __y) > - { > - typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; > - return fmod(__type(__x), __type(__y)); > - } > - > using ::frexp; > > #ifndef __CORRECT_ISO_CPP_MATH_H_PROTO > @@ -411,15 +393,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION > #endif > #endif > > - template > - inline _GLIBCXX_CONSTEXPR > - typename __gnu_cxx::__promote_2<_Tp, _Up>::__type > - pow(_Tp __x, _Up __y) > - { > - typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; > - return pow(__type(__x), __type(__y)); > - } > - > using ::sin; > > #ifndef __CORRECT_ISO_CPP_MATH_H_PROTO > @@ -1073,6 +1046,33 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION > { return __gnu_cxx::__bfloat16_t(__builtin_tanhf(__x)); } > #endif > > + template > + inline _GLIBCXX_CONSTEXPR > + typename __gnu_cxx::__promote_2<_Tp, _Up>::__type > + atan2(_Tp __y, _Up __x) > + { > + typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; > + return atan2(__type(__y), __type(__x)); > + } > + > + template > + inline _GLIBCXX_CONSTEXPR > + typename __gnu_cxx::__promote_2<_Tp, _Up>::__type > + fmod(_Tp __x, _Up __y) > + { > + typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; > + return fmod(__type(__x), __type(__y)); > + } > + > + template > + inline _GLIBCXX_CONSTEXPR > + typename __gnu_cxx::__promote_2<_Tp, _Up>::__type > + pow(_Tp __x, _Up __y) > + { > + typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; > + return pow(__type(__x), __type(__y)); > + } > + > #if _GLIBCXX_USE_C99_MATH > #if !_GLIBCXX_USE_C99_FP_MACROS_DYNAMIC > > @@ -2107,16 +2107,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION > { return __builtin_copysignl(__x, __y); } > #endif > > -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT > - template > - constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type > - copysign(_Tp __x, _Up __y) > - { > - typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; > - return copysign(__type(__x), __type(__y)); > - } > -#endif > - > #ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP > constexpr float > erf(float __x) > @@ -2199,16 +2189,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION > { return __builtin_fdiml(__x, __y); } > #endif > > -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT > - template > - constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type > - fdim(_Tp __x, _Up __y) > - { > - typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; > - return fdim(__type(__x), __type(__y)); > - } > -#endif > - > #ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP > constexpr float > fma(float __x, float __y, float __z) > @@ -2219,16 +2199,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION > { return __builtin_fmal(__x, __y, __z); } > #endif > > -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT > - template > - constexpr typename __gnu_cxx::__promote_3<_Tp, _Up, _Vp>::__type > - fma(_Tp __x, _Up __y, _Vp __z) > - { > - typedef typename __gnu_cxx::__promote_3<_Tp, _Up, _Vp>::__type > __type; > - return fma(__type(__x), __type(__y), __type(__z)); > - } > -#endif > - > #ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP > constexpr float > fmax(float __x, float __y) > @@ -2239,16 +2209,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION > { return __builtin_fmaxl(__x, __y); } > #endif > > -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT > - template > - constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type > - fmax(_Tp __x, _Up __y) > - { > - typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; > - return fmax(__type(__x), __type(__y)); > - } > -#endif > - > #ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP > constexpr float > fmin(float __x, float __y) > @@ -2259,16 +2219,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION > { return __builtin_fminl(__x, __y); } > #endif > > -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT > - template > - constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type > - fmin(_Tp __x, _Up __y) > - { > - typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; > - return fmin(__type(__x), __type(__y)); > - } > -#endif > - > #ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP > constexpr float > hypot(float __x, float __y) > @@ -2279,16 +2229,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION > { return __builtin_hypotl(__x, __y); } > #endif > > -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT > - template > - constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type > - hypot(_Tp __x, _Up __y) > - { > - typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; > - return hypot(__type(__x), __type(__y)); > - } > -#endif > - > #ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP > constexpr int > ilogb(float __x) > @@ -2481,16 +2421,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION > { return __builtin_nextafterl(__x, __y); } > #endif > > -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT > - template > - constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type > - nextafter(_Tp __x, _Up __y) > - { > - typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; > - return nextafter(__type(__x), __type(__y)); > - } > -#endif > - > #ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP > constexpr float > nexttoward(float __x, long double __y) > @@ -2519,16 +2449,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION > { return __builtin_remainderl(__x, __y); } > #endif > > -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT > - template > - constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type > - remainder(_Tp __x, _Up __y) > - { > - typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; > - return remainder(__type(__x), __type(__y)); > - } > -#endif > - > #ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP > inline float > remquo(float __x, float __y, int* __pquo) > @@ -2539,16 +2459,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION > { return __builtin_remquol(__x, __y, __pquo); } > #endif > > -#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT > - template > - inline typename __gnu_cxx::__promote_2<_Tp, _Up>::__type > - remquo(_Tp __x, _Up __y, int* __pquo) > - { > - typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; > - return remquo(__type(__x), __type(__y), __pquo); > - } > -#endif > - > #ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP > constexpr float > rint(float __x) > @@ -3555,6 +3465,79 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION > { return __gnu_cxx::__bfloat16_t(__builtin_truncf(__x)); } > #endif > > +#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT > + template > + constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type > + copysign(_Tp __x, _Up __y) > + { > + typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; > + return copysign(__type(__x), __type(__y)); > + } > + > + template > + constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type > + fdim(_Tp __x, _Up __y) > + { > + typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; > + return fdim(__type(__x), __type(__y)); > + } > + > + template > + constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type > + fmax(_Tp __x, _Up __y) > + { > + typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; > + return fmax(__type(__x), __type(__y)); > + } > + > + template > + constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type > + fmin(_Tp __x, _Up __y) > + { > + typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; > + return fmin(__type(__x), __type(__y)); > + } > + > + template > + constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type > + hypot(_Tp __x, _Up __y) > + { > + typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; > + return hypot(__type(__x), __type(__y)); > + } > + > + template > + constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type > + nextafter(_Tp __x, _Up __y) > + { > + typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; > + return nextafter(__type(__x), __type(__y)); > + } > + > + template > + constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type > + remainder(_Tp __x, _Up __y) > + { > + typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; > + return remainder(__type(__x), __type(__y)); > + } > + > + template > + inline typename __gnu_cxx::__promote_2<_Tp, _Up>::__type > + remquo(_Tp __x, _Up __y, int* __pquo) > + { > + typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; > + return remquo(__type(__x), __type(__y), __pquo); > + } > + > + template > + constexpr typename __gnu_cxx::__promote_3<_Tp, _Up, _Vp>::__type > + fma(_Tp __x, _Up __y, _Vp __z) > + { > + typedef typename __gnu_cxx::__promote_3<_Tp, _Up, _Vp>::__type > __type; > + return fma(__type(__x), __type(__y), __type(__z)); > + } > +#endif > > #endif // _GLIBCXX_USE_C99_MATH_TR1 > #endif // C++11 > --- > libstdc++-v3/testsuite/26_numerics/headers/cmath/constexpr_std_c++23.cc.jj > 2023-05-17 15:23:55.120327327 +0200 > +++ > libstdc++-v3/testsuite/26_numerics/headers/cmath/constexpr_std_c++23.cc > 2023-05-17 16:19:27.386931508 +0200 > @@ -0,0 +1,129 @@ > +// Copyright (C) 2023 Free Software Foundation, Inc. > +// > +// This file is part of the GNU ISO C++ Library. This library is free > +// software; you can redistribute it and/or modify it under the > +// terms of the GNU General Public License as published by the > +// Free Software Foundation; either version 3, or (at your option) > +// any later version. > + > +// This library is distributed in the hope that it will be useful, > +// but WITHOUT ANY WARRANTY; without even the implied warranty of > +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > +// GNU General Public License for more details. > + > +// You should have received a copy of the GNU General Public License along > +// with this library; see the file COPYING3. If not see > +// . > + > +// { dg-options "-std=gnu++2b" } > +// { dg-do link { target c++23 } } > + > +#include > +#include > + > +template > +void > +test_functions() > +{ > + constexpr T zero = 0; > + constexpr T one = 1; > + constexpr auto a = std::acos(one); > + constexpr auto b = std::asin(zero); > + constexpr auto c = std::atan(zero); > + constexpr auto d = std::cos(zero); > + constexpr auto e = std::sin(zero); > + constexpr auto f = std::tan(zero); > + constexpr auto g = std::acosh(one); > + constexpr auto h = std::asinh(zero); > + constexpr auto i = std::atanh(zero); > + constexpr auto j = std::cosh(zero); > + constexpr auto k = std::sinh(zero); > + constexpr auto l = std::tanh(zero); > + constexpr auto m = std::exp(zero); > + constexpr auto n = std::exp2(zero); > + constexpr auto o = std::expm1(one); > + constexpr auto p = std::log(one); > + constexpr auto q = std::log10(one); > + constexpr auto r = std::log1p(zero); > + constexpr auto s = std::log2(one); > + constexpr auto t = std::logb(one); > + constexpr auto u = std::cbrt(zero); > + constexpr auto v = std::fabs(zero); > + constexpr auto w = std::sqrt(one); > + constexpr auto x = std::erf(zero); > + constexpr auto y = std::erfc(zero); > +// constexpr auto z = std::lgamma(one); > + constexpr auto A = std::tgamma(one); > + constexpr auto B = std::ceil(zero); > + constexpr auto C = std::floor(zero); > +// constexpr auto D = std::nearbyint(zero); > +// constexpr auto E = std::rint(zero); > + constexpr auto F = std::round(zero); > + constexpr auto G = std::trunc(zero); > + constexpr auto H = std::atan2(zero, one); > + constexpr auto I = std::hypot(one, zero); > + constexpr auto J = std::pow(one, zero); > + constexpr auto K = std::fmod(zero, one); > + constexpr auto L = std::remainder(one, one); > + constexpr auto M = std::copysign(zero, zero); > + constexpr auto N = std::nextafter(zero, zero); > + constexpr auto O = std::fdim(zero, zero); > + constexpr auto P = std::fmax(zero, one); > + constexpr auto Q = std::fmin(zero, one); > + constexpr auto R = std::ilogb(one); > + constexpr auto S = std::ldexp(one, 0); > + constexpr auto U = std::scalbn(one, 1); > + constexpr auto V = std::scalbln(one, 1); > +// constexpr auto W = std::lrint(one); > +// constexpr auto X = std::llrint(one); > + constexpr auto Y = std::lround(one); > + constexpr auto Z = std::llround(one); > + constexpr auto a1 = std::fma(one, one, one); > + constexpr auto b1 = std::atan2(zero, 1); > + constexpr auto c1 = std::hypot(one, 0); > + constexpr auto d1 = std::pow(one, 0); > + constexpr auto e1 = std::fmod(zero, 1); > + constexpr auto f1 = std::remainder(one, 1); > + constexpr auto g1 = std::copysign(zero, 0); > + constexpr auto h1 = std::nextafter(zero, 0); > + constexpr auto i1 = std::fdim(zero, 0); > + constexpr auto j1 = std::fmax(zero, 1); > + constexpr auto k1 = std::fmin(zero, 1); > + constexpr auto l1 = std::fma(one, one, 1); > + constexpr auto n1 = std::atan2(0, one); > + constexpr auto o1 = std::hypot(1, zero); > + constexpr auto p1 = std::pow(1, zero); > + constexpr auto q1 = std::fmod(0, one); > + constexpr auto r1 = std::remainder(1, one); > + constexpr auto s1 = std::copysign(0, zero); > + constexpr auto t1 = std::nextafter(0, zero); > + constexpr auto u1 = std::fdim(0, zero); > + constexpr auto v1 = std::fmax(0, one); > + constexpr auto w1 = std::fmin(0, one); > + constexpr auto x1 = std::fma(one, 1, one); > + constexpr auto y1 = std::fma(1, one, one); > + constexpr auto z1 = std::fma(1, 1, one); > + constexpr auto A1 = std::fma(1, one, 1); > +} > + > +int > +main() > +{ > +#if defined(__STDCPP_FLOAT16_T__) && > defined(_GLIBCXX_FLOAT_IS_IEEE_BINARY32) > + test_functions(); > +#endif > +#if defined(__STDCPP_FLOAT32_T__) && > defined(_GLIBCXX_FLOAT_IS_IEEE_BINARY32) > + test_functions(); > +#endif > +#if defined(__STDCPP_FLOAT64_T__) && > defined(_GLIBCXX_DOUBLE_IS_IEEE_BINARY64) > + test_functions(); > +#endif > +#if defined(__STDCPP_FLOAT128_T__) \ > + && (defined(_GLIBCXX_DOUBLE_IS_IEEE_BINARY128) \ > + || defined(_GLIBCXX_HAVE_FLOAT128_MATH)) > + test_functions(); > +#endif > +#if defined(__STDCPP_BFLOAT16_T__) && > defined(_GLIBCXX_FLOAT_IS_IEEE_BINARY32) > + test_functions(); > +#endif > +} > > Jakub > > --00000000000076752405fbe8827a--