[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
Preferred exponent for acos(1)
The question arises for cos(0) too!
See my post of last December, just prior to the recirculation ballot:
Date: Wednesday 19 Dec 2007 at 10:35 p.m. EST (2007-12-20 03:35 GMT)
To: Bob Davis <bob@xxxxxxxx>
CC: stds-754 <stds-754@xxxxxxxxxxxxxxxxx>
From: Michel Hack (1-914-784-7648) <hack@xxxxxxxxxxxxxx>
Subject: P754 rogue comment on preferred exponent
Here is a copy of the relevant point. It was passed along to the BRC
as rogue comment #657. It seems that no action was taken prior to
the Jan 2008 recirculation ballot; perhaps it is being considered now.
John Harrison's choices match possibilities (b), (c) and (d) here.
(3) Clause 9.2, Recommended correctly-rounded functions.
No preferred exponent is mentioned at all, even though several
functions can have exact results. We are very fussy about the
sign of zero, but apparently don't care about its exponent (for
decimal formats).
I don't have a specific recommendation, as there are several
sensible possibilities, including the one of leaving the choice
open -- but something has to be said! Here are some alternatives:
(a) Implementations are free to choose the cohort member of
decimal results. In practice this will almost always be
the one with the least possible exponent, as almost all
results are inexact -- but for exact results there is no
specific requirement.
(b) The preferred exponent is always the smallest possible,
whether the result is exact or not. This mimics the binary
case, where full precision is used (except for subnormals).
(c) The preferred exponent is always the smallest possible,
except for exact -1, 0 and +1, where it is zero.
(d) The preferred exponent is zero for exact results, when the
arguments are in the domain for which correctly-rounded
results are claimed. This should always include exact
results of -1, +-0, and +1.
(e) Each function capable of producing exact results (this
includes exp2, exp10, log2, log10, hypot, sinpi and friends,
and possibly pown and rootn; perhaps even pow and compound)
should document a formula for the preferred exponent of
claimed exact results.
Sincerely,
Michel Hack.
Sent: 2008-03-04 05:59:42 UTC