Re: Accuracy of 754-compliant recommended functions
Michel,
Does this mean that, if the functions recommended in 754-2008 are
provided, they must return the nearest floating point number
subject to the rounding mode in effect? That is what I originally
thought it said. The relevant sections of 754-2008 are
Clause 9.1, in which it says "A conforming
function shall return results correctly rounded for the applicable
rounding direction for all operands
in its domain. The preferred quantum is language-defined," and
the definition of quantum: "2.1.44 quantum: The quantum of a finite
floating-point representation is the value of a
unit in the last position of its significand. This is equal to the radix
raised to the exponent q, which
is used when the significand is regarded as an integer."
Where do you get that a quantum is defined only for decimal?
Baker
On 07/01/2013 09:14 AM, Michel Hack wrote:
Baker Kearfott wrote:
I had earlier interpreted "correctly rounded" to mean to the greatest
floating point number less than, the nearest floating point number,
or the smallest floating point number greater than, depending on the
rounding mode. Actually, IEEE 754-2008 uses the term to mean simply
"less than the exact result" in the case of downward rounding, etc.
754-2008 only requires the "nearest" such floating point number for
the basic operations, and for binary to decimal and decimal to binary
conversions, but allows the language to define the "quantum" for
rounding for the recommended elementary functions.
Sorry, there are two confusions here.
(1) "Correctly rounded" means that the result is the ONE AND ONLY result
that corresponds to the applicable rounding direction.
(2) "Quantum" only applies to Decimal formats, and only affects the
representation, NOT the value. It is also only relevant for exact
results; inexact results always use the smallest possible quantum
in order to deliver as much precision as the format allows.
The "quantum" of a BFP datum is always 1 ulp, and the precision is
always full except for subnormals, which all have the same quantum,
namely the smallest subnormal value.
Michel.
---Sent: 2013-07-01 14:22:33 UTC
--
---------------------------------------------------------------
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
---------------------------------------------------------------