Groups | Search | Server Info | Login | Register


Groups > comp.arch.arithmetic > #82

Re: IEEE 754 Asks the Impossible

From WE@completely.invalid (Wolfgang Ehrhardt)
Newsgroups comp.arch.arithmetic
Subject Re: IEEE 754 Asks the Impossible
Date 2016-04-04 10:08 +0000
Organization Aioe.org NNTP Server
Message-ID <57023946.13289931@news.aioe.org> (permalink)
References <1798a8bc-aab4-442b-8988-722c22db1d34@googlegroups.com>

Show all headers | View raw


On Sat, 2 Apr 2016 11:27:19 -0700 (PDT), Quadibloc <jsavard@ecn.ab.ca>
wrote:

>Using the guard, round, and sticky bits, it is possible to always compute, =
>in a reasonable time, the nearest rounded value for addition, subtraction, =
>multiplication, division - and even square root.
>
>However, according to the Wikipedia page on the IEEE 754 standard, while th=
>is was all the 1985 standard asked, the current standard insists on correct=
> rounding even for the transcendental functions - log and trig functions. U=
>nlike rounding to a precision of a unit just over half the least difference=
> between floating-point numbers, this can take a long time in a few, rare, =
>cases.
>
>Even so, some math libraries are currently offered, so says Wikipedia, whic=
>h meet this standard. I am surprised. And I hardly think that it is wise to=
> make such a requirement, or attempt to meet it, for most implementations.
>
>Even getting the nearest rounded value for division, while easy enough for =
>some algorithms, imposes an unreasonable burden if one wishes to use a fast=
> division algorithm such as Newton-Raphson or Goldschmidt.
>
The requirement for basic arithmetic and sqrt is essential. Correct
round for log functions should be relative easy. A 'tricky' part are 
the trigonometric functions. But there are long-known well-known
algorithms for range reduction (Payne/Hanek, see e.g. 
K.C. Ng, Argument Reduction for Huge Arguments: Good to the Last Bit,
Technical report, SunPro, 1992. Available from
<http://www.validlab.com/arg.pdf>), this is used in many libraries
related to or derived from Sun FDLIBM
(<http://www.netlib.org/fdlibm>).

As in many situation you have to decide whether to trade-off accuracy
vs. speed, although if in doubt I would almost always choose accuracy
(and the overhead is not that large, because in practice you can you a

multi-stage range reduction, with Payne/Hanek used for the worst
cases).

Back to comp.arch.arithmetic | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

IEEE 754 Asks the Impossible Quadibloc <jsavard@ecn.ab.ca> - 2016-04-02 11:27 -0700
  Re: IEEE 754 Asks the Impossible WE@completely.invalid (Wolfgang Ehrhardt) - 2016-04-04 10:08 +0000
    Re: IEEE 754 Asks the Impossible Quadibloc <jsavard@ecn.ab.ca> - 2016-08-20 10:22 -0700
  Re: IEEE 754 Asks the Impossible Quadibloc <jsavard@ecn.ab.ca> - 2017-08-14 15:26 -0700

csiph-web