Sujet : Re: Radians Or Degrees?
De : mitchalsup (at) *nospam* aol.com (MitchAlsup1)
Groupes : comp.lang.c comp.archDate : 14. Mar 2024, 18:34:57
Autres entêtes
Organisation : Rocksolid Light
Message-ID : <a926c92f8e95f80bed61403c3676a684@www.novabbs.org>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14
User-Agent : Rocksolid Light
Michael S wrote:
On Fri, 23 Feb 2024 11:10:00 +0100
Terje Mathisen <terje.mathisen@tmsw.no> wrote:
MitchAlsup1 wrote:
Steven G. Kargl wrote:
Agreed a programmer should use what is required by the problem
that they are solving. I'll note that SW implementations have
their sets of tricks (e.g., use of double-double arithmetic to
achieve double precision).
To get near IEEE desired precision, one HAS TO use more than 754
precision.
There are groups who have shown that exactly rounded trancendental functions are in fact achievable with maybe 3X reduced performance.
>
At which cost in tables sizes?
There is a suggestion on the table to make that a (probably optional imho) feature for an upcoming ieee754 revision.
Terje
The critical point here is definition of what considered exact. If
'exact' is measured only on y side of y=foo(x), disregarding
possible imprecision on the x side then you are very likely to end up
with results that are slower to calculate, but not at all more useful
from point of view of engineer or physicist. Exactly like Payne-Hanek
or Mitch's equivalent of Payne-Hanek.
The definition of 'exact' should be:
For any finite-precision function foo(x) lets designate the same
mathematical function calculated with infinite precision as Foo(x).
Let's designate an operation of rounding of infinite-precision number to
desired finite precision as Rnd(). Rounding is done in to-nearest mode.
Unlike in the case of basic operations, ties are allowed to be broken in
any direction.
The result of y=foo(x) for finite-precision number x considered
exact if *at least one* two conditions is true:
(1=Y-clause) Rnd(Foo(x)) == y
(2=X-clause) There exist an infinite precision number X for which
both Foo(X) == y and Rnd(X) == x.
In the second clause:: are we guaranteed that RND(Foo(X))= Y ??
As follows from the (2), it is possible and not uncommon that more
than one finite-precision number y is accepted exact result of foo(x).
If Committee omits the 2nd clause then the whole proposition will be not
just not useful, but harmful.
An interesting side effect of greater intermediate precision is the lack
of need to round prior to the final result. Thus, my sin(x) over its
entire calculation suffers exactly 1 rounding. Payne & Hanek does not
have this prperty.