Extreme floating point values: Difference between revisions
m
→{{header|Wren}}: minor change to preamble.
(→{{header|Wren}}: Added some NaN comparisons using object equality) |
m (→{{header|Wren}}: minor change to preamble.) |
||
Line 2,412:
Wren has built-in constants for infinity and NaN though they can also be generated from 'normal' 64 bit floating point values which is the underlying type of all numbers in Wren.
Note that when using the built-in operators NaN's never compare equal, even to themselves. Also, internally, Wren generates several different NaN values but the value returned by the built-in constant ''Num.nan'' is always the minimum 'quiet' NaN whose bit
<syntaxhighlight lang="ecmascript">// using pre-defined constants
var inf = Num.infinity
|