public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/79700] std::fabsf and std::fabsl missing from <cmath>
       [not found] <bug-79700-4@http.gcc.gnu.org/bugzilla/>
@ 2020-12-22 23:31 ` kip at thevertigo dot com
  2020-12-23  8:34 ` redi at gcc dot gnu.org
                   ` (20 subsequent siblings)
  21 siblings, 0 replies; 22+ messages in thread
From: kip at thevertigo dot com @ 2020-12-22 23:31 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79700

Kip Warner <kip at thevertigo dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kip at thevertigo dot com

--- Comment #5 from Kip Warner <kip at thevertigo dot com> ---
I am experiencing the same problem with GCC 10.2.0.

I have included <cmath> and I am attempting to rely on std::ceilf. g++(1) bails
with:

error: ‘ceilf’ is not a member of ‘std’; did you mean ‘ceil’

$ g++ --version
g++ (Ubuntu 10.2.0-13ubuntu1) 10.2.0

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug libstdc++/79700] std::fabsf and std::fabsl missing from <cmath>
       [not found] <bug-79700-4@http.gcc.gnu.org/bugzilla/>
  2020-12-22 23:31 ` [Bug libstdc++/79700] std::fabsf and std::fabsl missing from <cmath> kip at thevertigo dot com
@ 2020-12-23  8:34 ` redi at gcc dot gnu.org
  2020-12-23 17:33 ` kip at thevertigo dot com
                   ` (19 subsequent siblings)
  21 siblings, 0 replies; 22+ messages in thread
From: redi at gcc dot gnu.org @ 2020-12-23  8:34 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79700

--- Comment #6 from Jonathan Wakely <redi at gcc dot gnu.org> ---
As it says, you can just use std::ceil.

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug libstdc++/79700] std::fabsf and std::fabsl missing from <cmath>
       [not found] <bug-79700-4@http.gcc.gnu.org/bugzilla/>
  2020-12-22 23:31 ` [Bug libstdc++/79700] std::fabsf and std::fabsl missing from <cmath> kip at thevertigo dot com
  2020-12-23  8:34 ` redi at gcc dot gnu.org
@ 2020-12-23 17:33 ` kip at thevertigo dot com
  2020-12-23 20:48 ` redi at gcc dot gnu.org
                   ` (18 subsequent siblings)
  21 siblings, 0 replies; 22+ messages in thread
From: kip at thevertigo dot com @ 2020-12-23 17:33 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79700

--- Comment #7 from Kip Warner <kip at thevertigo dot com> ---
Not if I want any certainty at compile time that it is single precision.

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug libstdc++/79700] std::fabsf and std::fabsl missing from <cmath>
       [not found] <bug-79700-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2020-12-23 17:33 ` kip at thevertigo dot com
@ 2020-12-23 20:48 ` redi at gcc dot gnu.org
  2020-12-23 20:52 ` redi at gcc dot gnu.org
                   ` (17 subsequent siblings)
  21 siblings, 0 replies; 22+ messages in thread
From: redi at gcc dot gnu.org @ 2020-12-23 20:48 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79700

--- Comment #8 from Jonathan Wakely <redi at gcc dot gnu.org> ---
If you call std::ceil with a float, you get the ceil(float) overload. If you
don't call it with a float, you haven't got subtle precision anyway and calling
ceil didn't change that.

If you need ceilf you can include <math.h> and call ceilf.

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug libstdc++/79700] std::fabsf and std::fabsl missing from <cmath>
       [not found] <bug-79700-4@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2020-12-23 20:48 ` redi at gcc dot gnu.org
@ 2020-12-23 20:52 ` redi at gcc dot gnu.org
  2020-12-23 22:06 ` kip at thevertigo dot com
                   ` (16 subsequent siblings)
  21 siblings, 0 replies; 22+ messages in thread
From: redi at gcc dot gnu.org @ 2020-12-23 20:52 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79700

--- Comment #9 from Jonathan Wakely <redi at gcc dot gnu.org> ---
And calling ceilf(x) doesn't give you any certainty of single precision,
because if x is a double then it will still work, but you're now doing a
conversion from double to float.

If you already know x is a float, then std::ceil(x) is single precision. If you
don't know it's a float, using ceilf doesn't change that. The only certainty
you have is x will be converted to float.

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug libstdc++/79700] std::fabsf and std::fabsl missing from <cmath>
       [not found] <bug-79700-4@http.gcc.gnu.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2020-12-23 20:52 ` redi at gcc dot gnu.org
@ 2020-12-23 22:06 ` kip at thevertigo dot com
  2020-12-23 23:04 ` redi at gcc dot gnu.org
                   ` (15 subsequent siblings)
  21 siblings, 0 replies; 22+ messages in thread
From: kip at thevertigo dot com @ 2020-12-23 22:06 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79700

--- Comment #10 from Kip Warner <kip at thevertigo dot com> ---
Thanks Jonathan, but I disagree. The point is that the caller might be wrong in
any number of assumptions. The library designers were in agreement, hence why
there is an explicit ceilf function.

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug libstdc++/79700] std::fabsf and std::fabsl missing from <cmath>
       [not found] <bug-79700-4@http.gcc.gnu.org/bugzilla/>
                   ` (5 preceding siblings ...)
  2020-12-23 22:06 ` kip at thevertigo dot com
@ 2020-12-23 23:04 ` redi at gcc dot gnu.org
  2020-12-23 23:09 ` kip at thevertigo dot com
                   ` (14 subsequent siblings)
  21 siblings, 0 replies; 22+ messages in thread
From: redi at gcc dot gnu.org @ 2020-12-23 23:04 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79700

--- Comment #11 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Nope, ceilf comes from C, which has no overloading.

C++ doesn't need separate names for ceil, ceilf and ceill, so you just have
std::ceil.

The fact std::ceilf exists at all is just for consistency with C, not because
"the library designers" considered it important. That's why it wasn't even
mentioned in C++98, C++03, C++11, or C++14.

We will add all the functions listed above in this bug, because they're meant
to be there, but they are not essential. You can use std::ceil((float)x) or
::ceilf(x) as a workaround with identical semantics.

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug libstdc++/79700] std::fabsf and std::fabsl missing from <cmath>
       [not found] <bug-79700-4@http.gcc.gnu.org/bugzilla/>
                   ` (6 preceding siblings ...)
  2020-12-23 23:04 ` redi at gcc dot gnu.org
@ 2020-12-23 23:09 ` kip at thevertigo dot com
  2020-12-24  0:42 ` redi at gcc dot gnu.org
                   ` (13 subsequent siblings)
  21 siblings, 0 replies; 22+ messages in thread
From: kip at thevertigo dot com @ 2020-12-23 23:09 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79700

--- Comment #12 from Kip Warner <kip at thevertigo dot com> ---
I didn't say STL. I said library designers which includes the standard C
runtime. And no, I don't agree with you. Separate names are helpful for greater
certainty. As for std::ceilf existing just for consistency with C, that's
speculative and, in my view doubtful.

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug libstdc++/79700] std::fabsf and std::fabsl missing from <cmath>
       [not found] <bug-79700-4@http.gcc.gnu.org/bugzilla/>
                   ` (7 preceding siblings ...)
  2020-12-23 23:09 ` kip at thevertigo dot com
@ 2020-12-24  0:42 ` redi at gcc dot gnu.org
  2020-12-24  1:02 ` kip at thevertigo dot com
                   ` (12 subsequent siblings)
  21 siblings, 0 replies; 22+ messages in thread
From: redi at gcc dot gnu.org @ 2020-12-24  0:42 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79700

--- Comment #13 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Kip Warner from comment #12)
> I didn't say STL. I said library designers which includes the standard C
> runtime.

Why a particular name is used by C is not relevant to C++. The function is in
C++ because it was inherited from C99, with no discussion or consideration
about suitability for the C++ library.

> And no, I don't agree with you. Separate names are helpful for
> greater certainty. As for std::ceilf existing just for consistency with C,
> that's speculative and, in my view doubtful.

It's not speculative. I am certain that ceilf was never once mentioned in a
WG21 proposal (or minutes of WG21 meetings) until https://wg21.link/p0175
proposed explicitly naming it in the C++ standard for consistency with the
contents of <math.h> in C99.

It had previously been mentioned in https://wg21.link/lwg289 which concluded
that ceilf etc were *not* part of the C++ standard (which meant C++98 at the
time). There was no subsequent design decision to explicitly add it to C++, it
was brought it when C++ rebased its library on the C99 library. In other words,
for consistency with C.

Your time would be better spent submitting a patch to add it to libstdc++
rather than trying to convince me of its history in the C++ library.

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug libstdc++/79700] std::fabsf and std::fabsl missing from <cmath>
       [not found] <bug-79700-4@http.gcc.gnu.org/bugzilla/>
                   ` (8 preceding siblings ...)
  2020-12-24  0:42 ` redi at gcc dot gnu.org
@ 2020-12-24  1:02 ` kip at thevertigo dot com
  2021-03-02 10:57 ` redi at gcc dot gnu.org
                   ` (11 subsequent siblings)
  21 siblings, 0 replies; 22+ messages in thread
From: kip at thevertigo dot com @ 2020-12-24  1:02 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79700

--- Comment #14 from Kip Warner <kip at thevertigo dot com> ---
Thanks Jonathan, but I still think you are mistaken in that you don't
understand why the function exists in its various forms. Your explanation is
technical and not philosophical.

Whether it was originally inherited from the standard C library or was a
creature of a C++ WG committee isn't material. And yes, you are being
speculative. 

We can discuss another day the history, design choices, and rationale behind
how floating point calculations have been done. In any event, we are going
around in circles.

But the important thing is that this is thankfully being patched.

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug libstdc++/79700] std::fabsf and std::fabsl missing from <cmath>
       [not found] <bug-79700-4@http.gcc.gnu.org/bugzilla/>
                   ` (9 preceding siblings ...)
  2020-12-24  1:02 ` kip at thevertigo dot com
@ 2021-03-02 10:57 ` redi at gcc dot gnu.org
  2021-03-24 14:26 ` redi at gcc dot gnu.org
                   ` (10 subsequent siblings)
  21 siblings, 0 replies; 22+ messages in thread
From: redi at gcc dot gnu.org @ 2021-03-02 10:57 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79700

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tilman.vogel at web dot de

--- Comment #15 from Jonathan Wakely <redi at gcc dot gnu.org> ---
*** Bug 99338 has been marked as a duplicate of this bug. ***

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug libstdc++/79700] std::fabsf and std::fabsl missing from <cmath>
       [not found] <bug-79700-4@http.gcc.gnu.org/bugzilla/>
                   ` (10 preceding siblings ...)
  2021-03-02 10:57 ` redi at gcc dot gnu.org
@ 2021-03-24 14:26 ` redi at gcc dot gnu.org
  2021-08-11  3:27 ` hewillk at gmail dot com
                   ` (9 subsequent siblings)
  21 siblings, 0 replies; 22+ messages in thread
From: redi at gcc dot gnu.org @ 2021-03-24 14:26 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79700

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                URL|                            |https://gcc.gnu.org/piperma
                   |                            |il/libstdc++/2021-March/052
                   |                            |237.html
   Target Milestone|---                         |12.0

--- Comment #16 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Partial fix attached to
https://gcc.gnu.org/pipermail/libstdc++/2021-March/052237.html

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug libstdc++/79700] std::fabsf and std::fabsl missing from <cmath>
       [not found] <bug-79700-4@http.gcc.gnu.org/bugzilla/>
                   ` (11 preceding siblings ...)
  2021-03-24 14:26 ` redi at gcc dot gnu.org
@ 2021-08-11  3:27 ` hewillk at gmail dot com
  2022-04-19  9:10 ` de34 at live dot cn
                   ` (8 subsequent siblings)
  21 siblings, 0 replies; 22+ messages in thread
From: hewillk at gmail dot com @ 2021-08-11  3:27 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79700

康桓瑋 <hewillk at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hewillk at gmail dot com

--- Comment #17 from 康桓瑋 <hewillk at gmail dot com> ---
*** Bug 101855 has been marked as a duplicate of this bug. ***

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug libstdc++/79700] std::fabsf and std::fabsl missing from <cmath>
       [not found] <bug-79700-4@http.gcc.gnu.org/bugzilla/>
                   ` (12 preceding siblings ...)
  2021-08-11  3:27 ` hewillk at gmail dot com
@ 2022-04-19  9:10 ` de34 at live dot cn
  2022-04-22  3:37 ` de34 at live dot cn
                   ` (7 subsequent siblings)
  21 siblings, 0 replies; 22+ messages in thread
From: de34 at live dot cn @ 2022-04-19  9:10 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79700

Jiang An <de34 at live dot cn> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |de34 at live dot cn

--- Comment #18 from Jiang An <de34 at live dot cn> ---
(In reply to Jonathan Wakely from comment #13)
> It's not speculative. I am certain that ceilf was never once mentioned in a
> WG21 proposal (or minutes of WG21 meetings) until https://wg21.link/p0175
> proposed explicitly naming it in the C++ standard for consistency with the
> contents of <math.h> in C99.

Actually ceilf was explicitly mentioned in TR1 (https://wg21.link/n1836),
although it was introduced as std::tr1::ceilf then. I don't know why the -f/-l
variants became implicit (or ignored) when merging TR1 (except for math special
functions) into the standard...

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug libstdc++/79700] std::fabsf and std::fabsl missing from <cmath>
       [not found] <bug-79700-4@http.gcc.gnu.org/bugzilla/>
                   ` (13 preceding siblings ...)
  2022-04-19  9:10 ` de34 at live dot cn
@ 2022-04-22  3:37 ` de34 at live dot cn
  2022-05-06  8:29 ` jakub at gcc dot gnu.org
                   ` (6 subsequent siblings)
  21 siblings, 0 replies; 22+ messages in thread
From: de34 at live dot cn @ 2022-04-22  3:37 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79700

--- Comment #19 from Jiang An <de34 at live dot cn> ---
Oh... I was wrong. TR1 mentioned -f and -l variants of "new" (C99) function
families (e.g. truncf), but no those of "old" (C89) math function families.

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug libstdc++/79700] std::fabsf and std::fabsl missing from <cmath>
       [not found] <bug-79700-4@http.gcc.gnu.org/bugzilla/>
                   ` (14 preceding siblings ...)
  2022-04-22  3:37 ` de34 at live dot cn
@ 2022-05-06  8:29 ` jakub at gcc dot gnu.org
  2022-05-06  8:47 ` redi at gcc dot gnu.org
                   ` (5 subsequent siblings)
  21 siblings, 0 replies; 22+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-05-06  8:29 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79700

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|12.0                        |12.2

--- Comment #20 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 12.1 is being released, retargeting bugs to GCC 12.2.

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug libstdc++/79700] std::fabsf and std::fabsl missing from <cmath>
       [not found] <bug-79700-4@http.gcc.gnu.org/bugzilla/>
                   ` (15 preceding siblings ...)
  2022-05-06  8:29 ` jakub at gcc dot gnu.org
@ 2022-05-06  8:47 ` redi at gcc dot gnu.org
  2023-04-26  6:55 ` rguenth at gcc dot gnu.org
                   ` (4 subsequent siblings)
  21 siblings, 0 replies; 22+ messages in thread
From: redi at gcc dot gnu.org @ 2022-05-06  8:47 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79700

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|12.2                        |13.0

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug libstdc++/79700] std::fabsf and std::fabsl missing from <cmath>
       [not found] <bug-79700-4@http.gcc.gnu.org/bugzilla/>
                   ` (16 preceding siblings ...)
  2022-05-06  8:47 ` redi at gcc dot gnu.org
@ 2023-04-26  6:55 ` rguenth at gcc dot gnu.org
  2023-07-27  9:22 ` rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  21 siblings, 0 replies; 22+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-04-26  6:55 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79700

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|13.0                        |13.2

--- Comment #21 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 13.1 is being released, retargeting bugs to GCC 13.2.

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug libstdc++/79700] std::fabsf and std::fabsl missing from <cmath>
       [not found] <bug-79700-4@http.gcc.gnu.org/bugzilla/>
                   ` (17 preceding siblings ...)
  2023-04-26  6:55 ` rguenth at gcc dot gnu.org
@ 2023-07-27  9:22 ` rguenth at gcc dot gnu.org
  2023-07-27 10:42 ` redi at gcc dot gnu.org
                   ` (2 subsequent siblings)
  21 siblings, 0 replies; 22+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-07-27  9:22 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79700

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|13.2                        |13.3

--- Comment #22 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 13.2 is being released, retargeting bugs to GCC 13.3.

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug libstdc++/79700] std::fabsf and std::fabsl missing from <cmath>
       [not found] <bug-79700-4@http.gcc.gnu.org/bugzilla/>
                   ` (18 preceding siblings ...)
  2023-07-27  9:22 ` rguenth at gcc dot gnu.org
@ 2023-07-27 10:42 ` redi at gcc dot gnu.org
  2023-11-11  0:41 ` cvs-commit at gcc dot gnu.org
  2023-11-11  1:04 ` redi at gcc dot gnu.org
  21 siblings, 0 replies; 22+ messages in thread
From: redi at gcc dot gnu.org @ 2023-07-27 10:42 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79700

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                URL|https://gcc.gnu.org/piperma |https://gcc.gnu.org/piperma
                   |il/libstdc++/2021-March/052 |il/gcc-patches/2023-Februar
                   |237.html                    |y/612339.html
   Last reconfirmed|2017-02-24 00:00:00         |2023-7-27
           Keywords|                            |patch

--- Comment #23 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Nathaniel provided a patch which I need to get committed:
https://gcc.gnu.org/pipermail/gcc-patches/2023-February/612339.html

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug libstdc++/79700] std::fabsf and std::fabsl missing from <cmath>
       [not found] <bug-79700-4@http.gcc.gnu.org/bugzilla/>
                   ` (19 preceding siblings ...)
  2023-07-27 10:42 ` redi at gcc dot gnu.org
@ 2023-11-11  0:41 ` cvs-commit at gcc dot gnu.org
  2023-11-11  1:04 ` redi at gcc dot gnu.org
  21 siblings, 0 replies; 22+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-11-11  0:41 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79700

--- Comment #24 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jonathan Wakely <redi@gcc.gnu.org>:

https://gcc.gnu.org/g:0b880466e910b4f1be2ea2d0d9cb9407d24ca299

commit r14-5341-g0b880466e910b4f1be2ea2d0d9cb9407d24ca299
Author: Nathaniel Shead <nathanieloshead@gmail.com>
Date:   Thu May 11 23:02:18 2023 +0100

    libstdc++: Add missing functions to <cmath> [PR79700]

    This patch adds the -f and -l variants of the C99 <math.h> functions to
    <cmath> under namespace std (so std::sqrtf, std::fabsl, etc.) for C++11
    and up.

    libstdc++-v3/ChangeLog:

            PR libstdc++/79700
            * include/c_global/cmath (acosf, acosl, asinf, asinl, atanf)
            (atanl, atan2f, atan2l, ceilf, ceill, cosf, cosl, coshf, coshl)
            (expf, expl, fabsf, fabsl, floorf, floorl, fmodf, fmodl, frexpf)
            (frexpl, ldexpf, ldexpl, logf, logl, log10f, log10l, modff)
            (modfl, powf, powl, sinf, sinl, sinhf, sinhl, sqrtf, sqrtl, tanf)
            (tanl, tanhf, tanhl): Add using-declarations in namespace std.
            * testsuite/26_numerics/headers/cmath/equivalent_functions.cc:
            New test.
            * testsuite/26_numerics/headers/cmath/functions_std_c++17.cc:
            Add checks for existence of above names.

    Signed-off-by: Nathaniel Shead <nathanieloshead@gmail.com>
    Reviewed-by: Jonathan Wakely <jwakely@redhat.com>

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug libstdc++/79700] std::fabsf and std::fabsl missing from <cmath>
       [not found] <bug-79700-4@http.gcc.gnu.org/bugzilla/>
                   ` (20 preceding siblings ...)
  2023-11-11  0:41 ` cvs-commit at gcc dot gnu.org
@ 2023-11-11  1:04 ` redi at gcc dot gnu.org
  21 siblings, 0 replies; 22+ messages in thread
From: redi at gcc dot gnu.org @ 2023-11-11  1:04 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79700

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|13.3                        |14.0
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #25 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Fixed for GCC 14 thanks to Nathaniel.

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2023-11-11  1:04 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-79700-4@http.gcc.gnu.org/bugzilla/>
2020-12-22 23:31 ` [Bug libstdc++/79700] std::fabsf and std::fabsl missing from <cmath> kip at thevertigo dot com
2020-12-23  8:34 ` redi at gcc dot gnu.org
2020-12-23 17:33 ` kip at thevertigo dot com
2020-12-23 20:48 ` redi at gcc dot gnu.org
2020-12-23 20:52 ` redi at gcc dot gnu.org
2020-12-23 22:06 ` kip at thevertigo dot com
2020-12-23 23:04 ` redi at gcc dot gnu.org
2020-12-23 23:09 ` kip at thevertigo dot com
2020-12-24  0:42 ` redi at gcc dot gnu.org
2020-12-24  1:02 ` kip at thevertigo dot com
2021-03-02 10:57 ` redi at gcc dot gnu.org
2021-03-24 14:26 ` redi at gcc dot gnu.org
2021-08-11  3:27 ` hewillk at gmail dot com
2022-04-19  9:10 ` de34 at live dot cn
2022-04-22  3:37 ` de34 at live dot cn
2022-05-06  8:29 ` jakub at gcc dot gnu.org
2022-05-06  8:47 ` redi at gcc dot gnu.org
2023-04-26  6:55 ` rguenth at gcc dot gnu.org
2023-07-27  9:22 ` rguenth at gcc dot gnu.org
2023-07-27 10:42 ` redi at gcc dot gnu.org
2023-11-11  0:41 ` cvs-commit at gcc dot gnu.org
2023-11-11  1:04 ` redi at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).