Test integerness: Difference between revisions

m
(→‎BQN: add NaN and a modifier)
m (→‎{{header|Wren}}: Minor tidy)
Line 2,818:
{{libheader|Wren-fmt}}
The -2e120 example requires the use of BigRat to reliably determine whether it's an integer or not. Although the Num class can deal with numbers of this size and correctly identifies it as an integer, it would do the same if (say) 0.5 were added to it because integer determination is only reliable up to around 15 digits.
<syntaxhighlight lang="ecmascriptwren">import "./big" for BigRat
import "./complex" for Complex
import "./rat" for Rat
import "./fmt" for Fmt
 
var tests1 = [25.000000, 24.999999, 25.000100]
9,479

edits