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

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



Is this argument meant to help us come to a consensus on
what accuracy (if any) we are to demand of the end points
of enclosing intervals for the elementary functions in
P-1788, i.e. what should be in the second column of
Table 8, p. 43 of the draft John just passed around.
Are we saying the "accurate" requirement for "sin" might
be too strict?

Of course, error bounds for most of these functions
are easy, e.g. sin(10^22) \in [-1,1], but the tightness
(or in floating point parlance the "accuracy") of these
bounds might be another matter.

Baker

On 03/12/2013 09: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.)



--

---------------------------------------------------------------
Ralph Baker Kearfott,   rbk@xxxxxxxxxxxxx   (337) 482-5346 (fax)
(337) 482-5270 (work)                     (337) 993-1827 (home)
URL: http://interval.louisiana.edu/kearfott.html
Department of Mathematics, University of Louisiana at Lafayette
(Room 217 Maxim D. Doucet Hall, 1403 Johnston Street)
Box 4-1010, Lafayette, LA 70504-1010, USA
---------------------------------------------------------------