Home Befunge
News News
Befunge Befunge
   - Programs
   - Compilers
   - Interpreters
   - Documentation

Doom Doom
Inform Inform
Quake Quake
RISC OS RISC OS
Misc Misc
Links Links
Contact Contact

Befunge divison tester

(divtest.bf, 318 bytes)

This short test script checks whether the signs of the divison and remainder computations are correct in a befunge 93/98 interpreter. The interpreter must support signed cells for the program to work.

If your interpreter is correct, then nothing will be printed. Otherwise, you'll see lines of the form:

4 -2 2 0 -4

The first two numbers are the divison/remainder inputs, the third is the divison result, the fourth the remainder result, and the fifth is the recomputed original number. In this case, the division result is positive instead of negative.

The program hasn't had much testing, but I think it can detect all errors.

This program has been largely superceded by the Fungus test suite.



Page last modified 03/03/2005