14 lines
425 B
Plaintext
14 lines
425 B
Plaintext
// SUM is not checked for infinity either: two sums overflow to +inf and -inf,
|
|
// their SUM is NaN, and the run goes on with it. T == T is then FALSE.
|
|
// RUN-STOPS: overflow@10
|
|
DECLARE A : LIST OF FLOAT
|
|
DECLARE B : LIST OF FLOAT
|
|
DECLARE M : LIST OF FLOAT
|
|
DECLARE T : FLOAT
|
|
A <- [1E308, 1E308]
|
|
B <- [-1E308, -1E308]
|
|
APPEND(M, SUM K IN [0, 2) : A[K])
|
|
APPEND(M, SUM K IN [0, 2) : B[K])
|
|
T <- SUM K IN [0, 2) : M[K]
|
|
ASSERT T == T
|