On 10/25/2013 10:13 AM, Tom Musta wrote:
> On 10/25/2013 11:42 AM, Richard Henderson wrote:
>> I believe that a better implementation could use float*_muladd, and check the
>> result for float_flag_invalid.  If set, compute the intermediate product so 
>> you
>> can figure out the VXISI setting.  But we'd expect that to be an unlikely 
>> path.
> 
> Interesting thought.  I think I see a way to re-arrange the code.  Thanks,
> Richard.

Actually, you don't even have to compute the intermediate product.

The only way you can have VXISI for a*b+c is for

  isinf(c) && (isinf(a) || isinf(b))

since the intermediate product a*b is infinite precision, and thus cannot
overflow to inf unless one of the multiplicands is already inf.


r~

Reply via email to