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

Re: Motion 31: V04.2 Revision of proposed Level 1 text



On 2012-02-07 17:26:08 -0800, Dan Zuras Intervals wrote:
> 	Way back when 754 was still a dream we discussed the
> 	need for negate(x) on the grounds that it might have
> 	to behave in a particular manner WRT the sign of zero
> 	in the context of directed roundings & branch cuts in
> 	the complex plane.  But, after a discussion that
> 	lasted far far longer than the issue called for, we
> 	decided that the sign of zero should be the same as
> 	the expression +0 - x.  So that argument was rendered
> 	moot but we included negate(x) anyway on the grounds
> 	that it was just a sign flip in an era when floating-
> 	point was done in software.

But it isn't a true real function, because it doesn't handle sNaN
like the other functions.

> 	Again, this is moot for intervals.  But for the same
> 	reason that Ulrich wants his dot product, the level 2
> 	FMA will be narrower than A*B + C.  So your point (b)
> 	is good in this case.

Well, I agree that FMA should be defined at Level 2. I was wondering
whether a Level 2 operation should necessarily be defined at Level 1.
But now I think it should, because the user first needs to express a
Level 1 problem (though from a mathematical point of view, an operation
like fma is more artificial than sinh, for instance).

In any case, I think that if the user writes A*B + C, a compiler
should be allowed to use fma(A,B,C). But this is a language-level
problem, where expressions can be regarded as math expressions
(which can be transformed) before they are interpreted as P1788
expressions. With interval arithmetic, transforming expressions
is much safer than with floating-point arithmetic.

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