Thread Links Date Links
Thread Prev Thread Next Thread Index Date Prev Date Next Date Index

Re: math function accuracy -- was Re: text2interval again /



This issue is precisely why the one and only requirement for an interval standard should be containment of the correct answer.

Then, let different implementations fight out in the market place returned width and speed as "qualities of implementation".

With a containment-only standard, every implementations claim to be standard compliant can be falsified with just a single counter-example.

Easy falsifiability is the hallmark of a good theory according to Karl Popper. Just as falsifying a theory is the road to progress in science, so to proving an implementation is not containment-only-standard-compliant is the road to narrow width *and* containment.



On 3/12/13 7:39 AM, Vincent Lefevre wrote:
On 2013-03-12 08:14:16 +0000, N.M. Maclaren wrote:
On Mar 12 2013, Vincent Lefevre wrote:
I'm not saying that P1788 should demand tightest. On the contrary.
What I'm saying is that even if P1788 just demands containment,
a program will benefit from implementations providing a good
accuracy. This is not true for floating-point: a C program has
no way to compute an error bound on some result, because C doesn't
have any requirement concerning the accuracy of math functions;
even if the result is accurate, the program cannot know this in
a portable way.
No, that isn't true.  Floating-point programs do benefit from more
accurate special functions, whether or not they calculate the error
bounds.  Also, there are ways to compute error bounds, but I agree
that they are painful and very dependent on the algorithm.
Say, you compute sin(10^22) on two different x86 machines:
   _ 32 bits: 0.46261304076460175
   _ 64 bits: -0.85220084976718879

What benefit do you get if you don't know which one is the
"correct" result (if there is any)? (And if you already know
it, you don't need a program to compute it.)