aboutsummaryrefslogtreecommitdiff
path: root/test/nums.tm
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-11-24 16:13:23 -0500
committerBruce Hill <bruce@bruce-hill.com>2024-11-24 16:13:23 -0500
commit0e10313d64f54dd587ebbcd5f413bd999333c911 (patch)
tree16a07c4b01467d59807611b23f91f9eb125959e2 /test/nums.tm
parent6ecf6a272446af04f3affd354520d21127a5b952 (diff)
Switch `NaN` to be identical to the null value
Diffstat (limited to 'test/nums.tm')
-rw-r--r--test/nums.tm42
1 files changed, 31 insertions, 11 deletions
diff --git a/test/nums.tm b/test/nums.tm
index 1391a129..4e6d34a9 100644
--- a/test/nums.tm
+++ b/test/nums.tm
@@ -22,27 +22,47 @@ func main():
>> Num.INF:isinf()
= yes
- >> Num.nan()
- = nan
- >> nan := Num.nan()
- >> nan:isnan()
- = yes
+ >> Num.NAN
+ = NULL : Num?
+ >> nan := Num.NAN
+ = NULL : Num?
>> nan == nan
+ = yes
+ >> nan < nan
= no
-
- >> Num.PI:cos():near(-1)
+ >> nan > nan
+ = no
+ >> nan != nan
+ = no
+ >> nan <> nan
+ = 0
+ >> nan == 0.0
+ = no
+ >> nan < 0.0
= yes
- >> Num.PI:sin():near(0)
+ >> nan > 0.0
+ = no
+ >> nan != 0.0
= yes
+ >> nan <> 0.0
+ = -1
- >> Num.nan():near(Num.nan())
- = no
+ >> nan + 1
+ = NULL : Num?
+
+ >> 0./0.
+ = NULL : Num?
+
+ >> Num.PI:cos()!:near(-1)
+ = yes
+ >> Num.PI:sin()!:near(0)
+ = yes
>> Num.INF:near(-Num.INF)
= no
>> Num32.sqrt(16)
- = 4 : Num32
+ = 4 : Num32?
>> 0.25:mix(10, 20)
= 12.5