i was just reading that!

does it mean (or just imply) that constant conversions are not 
implementation dependent?

i remember wondering, a while ago, why it was that NaN etc. weren't 
constants, after-all their encoding is unique and can't vary.

seems the reason for this is.....

"Numeric constants represent exact values of arbitrary precision and do not 
overflow. Consequently, there are no constants denoting the IEEE-754 
negative zero, infinity, and not-a-number values."

not sure how negative zero, for example, fails here, its a value of a float 
type, so it is Numeric, an exact value, and i don't really see how "of 
arbitrary precision and do not overflow" apply?

but this is stymieing the whole point of the way i was doing it, 
simple/clear/short/std.lib leveraging,  because it seems you HAVE to check 
them all, (NaN/+Inf/-Inf/-0) because an "implementation-dependent" value 
could be anything and so potentially exactly what you were expecting right 
up until it isn't! 

seems quite like map iteration randomisation. if it can be anything better 
make it random to cause earliest failure.

The spec is not particularly helpful, but it is not entirely silent. 
> It says: "In all non-constant conversions involving floating-point or 
> complex values, if the result type cannot represent the value the 
> conversion succeeds but the result value is implementation-dependent." 
>
> Ian 
>

-- 
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 golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/7937ab3d-31bf-4806-8380-49b894c7f611o%40googlegroups.com.

Reply via email to