krisbug/bugforth
2
4
Fork
You've already forked bugforth
1

All implementations of (+LOOP) are broken #10

Open
opened 2026年01月23日 17:44:51 +01:00 by krisbug · 0 comments

arch/c's (+LOOP) and the fallback in src/forth/core fail the following tests:

TESTING DO +LOOP with large and small increments
INCORRECT RESULT: T{ 0 MAX-UINT 0 USTEP GD8 -> 256 }T
INCORRECT RESULT: T{ 0 0 MAX-UINT -USTEP GD8 -> 256 }T
INCORRECT RESULT: T{ 0 MAX-INT MIN-INT STEP GD8 -> 256 }T
INCORRECT RESULT: T{ 0 MIN-INT MAX-INT -STEP GD8 -> 256 }T
INCORRECT RESULT: T{ 0 0 0 USTEP +UWRAP? 256 GD9
TESTING DO +LOOP with maximum and minimum increments
INCORRECT RESULT: T{ 0 -MAX-INT NEGATE -MAX-INT OVER GD8 -> 2 }T
INCORRECT RESULT: T{ 0 MIN-INT 1+ 1 MIN-INT GD8 -> 2 }T
arch/c's (+LOOP) and the fallback in src/forth/core fail the following tests: ``` TESTING DO +LOOP with large and small increments INCORRECT RESULT: T{ 0 MAX-UINT 0 USTEP GD8 -> 256 }T INCORRECT RESULT: T{ 0 0 MAX-UINT -USTEP GD8 -> 256 }T INCORRECT RESULT: T{ 0 MAX-INT MIN-INT STEP GD8 -> 256 }T INCORRECT RESULT: T{ 0 MIN-INT MAX-INT -STEP GD8 -> 256 }T INCORRECT RESULT: T{ 0 0 0 USTEP +UWRAP? 256 GD9 TESTING DO +LOOP with maximum and minimum increments INCORRECT RESULT: T{ 0 -MAX-INT NEGATE -MAX-INT OVER GD8 -> 2 }T INCORRECT RESULT: T{ 0 MIN-INT 1+ 1 MIN-INT GD8 -> 2 }T ```
Sign in to join this conversation.
No Branch/Tag specified
main
No results found.
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
krisbug/bugforth#10
Reference in a new issue
krisbug/bugforth
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?