Date: Tue, 27 Aug 2024 13:08:42 +0200
On 27/08/2024 12.35, Joachim Wuttke via Std-Discussion wrote:
> Do I see correctly that the standard says
> nothing about the precision of mathematical
> functions provided by <cmath>?
You see that correctly.
> Why not?
Nobody bothered with specification in that area.
Note that the standard also says nothing about
the precision of "a + b", either.
> Could this change in the future?
Yes. Proposals welcome.
> What is the point of adding ever more functions
> to <cmath> (like Bessel functions in c++17) if
> this comes without any guarantee of accuracy?
One answer is that some people believe they can
complain to their vendor about inaccuracies
much easier than about absence of a function that
the standard never specifies should exist in the
first place.
> As a user, I was better off depending on
> a dedicated third-party library than relying on
> a poor implementation in the C++ standard lib.
This option is still available to you.
Jens
> Do I see correctly that the standard says
> nothing about the precision of mathematical
> functions provided by <cmath>?
You see that correctly.
> Why not?
Nobody bothered with specification in that area.
Note that the standard also says nothing about
the precision of "a + b", either.
> Could this change in the future?
Yes. Proposals welcome.
> What is the point of adding ever more functions
> to <cmath> (like Bessel functions in c++17) if
> this comes without any guarantee of accuracy?
One answer is that some people believe they can
complain to their vendor about inaccuracies
much easier than about absence of a function that
the standard never specifies should exist in the
first place.
> As a user, I was better off depending on
> a dedicated third-party library than relying on
> a poor implementation in the C++ standard lib.
This option is still available to you.
Jens
Received on 2024-08-27 11:08:52