Actually, you would also want a way to say “which type of NaN” as there are two 
classes and several subclasses. I wrote code for this a while back and posted 
it here (IIRC).

 

From: <[email protected]> on behalf of <[email protected]>
Date: Sunday, September 11, 2016 at 6:32 AM
To: golang-nuts <[email protected]>
Cc: <[email protected]>
Subject: Re: [go-nuts] Re: Assigning +Inf to a float32 ..

 



On Sunday, 11 September 2016 14:25:29 UTC+1, Ian Lance Taylor wrote:

On Sun, Sep 11, 2016 at 6:06 AM,  <[email protected]> wrote: 
> 
> Also curious as why the implementation is as math.NaN() rather than just 
> math.NaN (function/method not constant). It doesn't seem to help with a 
> potential interfaces. 

Go constants are untyped, more or less unlimited, and do not support 
NaN or infinity or negative zero.  There would be no simple way to 
make math.NaN a constant. 

Ian 

 

Sorry my terminology error.

 

I meant exported variable, not constant.

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to