Initial commit
Test (in pplus-core) / in-core (push) Failing after 28m44s

This commit is contained in:
alexm committed 2026-11-12 22:23:48 -05:00
commit 568474d52f
1591 files changed
+528213

No files matched your search

+30
View File
@@ -0,0 +1,30 @@
// Rules the interpreter audit pinned: MOD past 2^53, a LIST OF FLOAT from whole-number literals,
// a function that leaves a WHILE TRUE only by RETURN, an ARRAY filled from a LIST of its length, minus zero.
// EXPECT: -2 2
// EXPECT: [1.0, 2.0] 3.0
// EXPECT: 5
// EXPECT: [1, 2, 9] 3
// EXPECT: 0 -0.0
FUNCTION FIRST_ABOVE(Xs : LIST OF INTEGER, Floor : INTEGER) RETURNS INTEGER
DECLARE I : INTEGER <- 0
WHILE TRUE
IF I >= LENGTH(Xs) THEN
RETURN -1
ENDIF
IF Xs[I] > Floor THEN
RETURN Xs[I]
ENDIF
I <- I + 1
ENDWHILE
ENDFUNCTION
OUTPUT 9007199254740991 MOD -3, " ", (-9007199254740991) MOD 3
DECLARE L : LIST OF FLOAT
L <- [1, 2]
OUTPUT L, " ", SUM_OF(L)
OUTPUT FIRST_ABOVE([1, 5, 9], 3)
DECLARE A : ARRAY[3] OF INTEGER
A <- [3, 1, 2]
SORT(A)
A[2] <- 9
OUTPUT A, " ", LENGTH(A)
OUTPUT 0 * (-1), " ", 0.0 * -1.0