C++ Logo

std-proposals

Advanced search

Re: new approximately equal operators

From: Dejan Milosavljevic <dmilos_at_[hidden]>
Date: Tue, 9 Jun 2020 18:00:11 +0200
Agree with that.
Here is more specific example from my experience.
By solving quadric equation some good epsilon is 1e-10 or 1e-12.
For quartic this epsilon can be: 1e-5, 1e-8 or 1-e10.

On Tue, Jun 9, 2020 at 12:26 PM Michael Hava via Std-Proposals <
std-proposals_at_[hidden]> wrote:

> From my experience with floating point numbers: there is no singular
> epsilon!
>
>
>
> The allowed difference between two “equal” values very much depends on the
> context and can vary for all algorithms in your code.
>
>
>
>
>
> *From:* Std-Proposals <std-proposals-bounces_at_[hidden]> *On Behalf
> Of *Vishal Oza via Std-Proposals
> *Sent:* Tuesday, June 9, 2020 12:26 AM
> *To:* Nikolay Mihaylov <nmmm_at_[hidden]>
> *Cc:* Vishal Oza <vickoza_at_[hidden]>; sotrdg sotrdg via Std-Proposals <
> std-proposals_at_[hidden]>
> *Subject:* Re: [std-proposals] new approximately equal operators
>
>
>
> 1. epsilon would be a very small number close to zero but not zero.
> Having epsilon as a variable might not be needed in there is a way to track
> the accuracy of floating point error over the course of the calculation to
> the operator.or we might be about to use the exponent to compute what
> epsilon value seem reasonable
> --
> Std-Proposals mailing list
> Std-Proposals_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals
>

Received on 2020-06-09 11:03:31