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

Re: Motion P1788.1/M004.01



On 2016-05-14 12:25:41 -0400, Michel Hack wrote:
> On Sat, 14 May 2016 12:18:20 -0400, Lee Winter wrote, replying to John Pryce:
> > But '754 does not have "zeros" or "infinities".  It has underflows
> > and overflows.
> 
> No -- 754 does have true (exact) zeros and infinities -- as well as
> (inexact) zeroes and infinities resulting from underflow or overflow.
> 
> Unfortunately 754 has no easy way to track the distinction.

This is not possible: the problem is undecidable (this is basically
the TMD on an exact case).

https://en.wikipedia.org/wiki/Richardson's_theorem

The best that one can do is to track exactness. Otherwise, one doesn't
know. But this is exactly how the inexact flag works (this is a global
flag, though; one would need wrappers to handle it at the variable
level, but I wonder whether there are practical uses).

So, if you have x = 0 with no exactness attached to it and you consider
1 / x, you cannot know whether this is a real division by 0 or just an
overflow on this particular operation.

> It can do so for a single operation by careful use of the IEEE
> flags, but has no way (unlike Unum, for example) to track the
> distinction in the value. The 1788 decorations are one way to
> address these issues, but they are not available in 754, which
> compounds the issue by heavily overloading the meaning of NaN
> (as well as zero and infinities).

Anyway, when you start to have infinities and/or NaN, the general
error analysis (when there is one) is no longer valid, so that it
is difficult to give a semantic to the result.

-- 
Vincent Lefèvre <vincent@xxxxxxxxxx> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)