This commit is contained in:
commit
568474d52f
1591 files changed
+528213
No files matched your search
@@ -0,0 +1,12 @@
|
||||
// USE IEEE: NaN and the infinities flow through a calculation as IEEE 754 says, instead of stopping the run.
|
||||
// EXPECT: infinity -infinity not a number
|
||||
// EXPECT: TRUE TRUE FALSE TRUE
|
||||
// EXPECT: not a number -infinity FALSE
|
||||
USE IEEE
|
||||
DECLARE Zero : FLOAT <- 0.0
|
||||
DECLARE Inf : FLOAT
|
||||
Inf <- 1.0 / Zero
|
||||
DECLARE NotANumber : FLOAT <- Inf - Inf
|
||||
OUTPUT Inf, " ", -Inf, " ", NotANumber
|
||||
OUTPUT IS_INF(Inf), " ", IS_NAN(NotANumber), " ", NotANumber == NotANumber, " ", NotANumber != NotANumber
|
||||
OUTPUT SQRT(-1.0), " ", LOG(0.0), " ", IS_FINITE(MAX_VALUE(FLOAT64) * 2.0)
|
||||
Reference in new issue
Block a user