[Cfp-interest 1529] Re: Background on hypot(x, y) for INFINITY and NAN

Jim Thomas jaswthomas at sbcglobal.net
Thu Mar 5 15:17:48 PST 2020


The general idea is that if an operation has the value k for all numerical inputs then it should have the value k for a quiet NaN input as well. This makes sense provided only that some numerical input was intended but for some reason/error the input arrived as a quiet NaN. It doesn’t matter if the input is erroneous, the result would be k no matter what was intended. If the NaN input were the result of an invalid operation, an exception would have been signaled when the NaN was created, which would allow finding out that a NaN had appeared. 

It’s thought that this is more helpful than the alternative of returning a NaN.

This principle extends to two argument operations like hypot when for a fixed value of one operand the operation is constant with respect to all numerical values of the other operand.

- Jim Thomas

> On Feb 25, 2020, at 7:55 PM, Damian McGuckin <damianm at esi.com.au> wrote:
> 
> 
> This is more an IEEE 754 issue.
> 
> I know it is long ago but does anybody have any reference document to the
> reasons behind the special values for hypot(x, y). I understand the logic
> in the context of statistics where NaNs might represent missing values but 
> I was after more background.
> 
> Thanks - Damian
> 
> Pacific Engineering Systems International, 277-279 Broadway, Glebe NSW 2037
> Ph:+61-2-8571-0847 .. Fx:+61-2-9692-9623 | unsolicited email not wanted here
> Views & opinions here are mine and not those of any past or present employer
> _______________________________________________
> Cfp-interest mailing list
> Cfp-interest at oakapple.net
> http://mailman.oakapple.net/mailman/listinfo/cfp-interest




More information about the Cfp-interest mailing list