Where: tri_cpu.zig and executor.zig at 976df51.
What happens.
- The machine reduces modulo 19683, which is 3^9.
- The code labels it 3^27.
- 3^27 = 7,625,597,484,987 appears nowhere in the tree.
Source: MODULUS_NOTE in specs/isa/tri27_machine.t27. The spec pins the value with the invariant the_modulus_is_three_to_the_nine (line 335).
Expected. Either the labels say 3^9, or the modulus becomes 3^27 if that was the intent. The two should not disagree.
Vector. No program vector, since the arithmetic is right and only the documentation is wrong. The spec's the_modular_scalar_operations test checks the value, e.g. mod_pos(-5, 19683) == 19678.
Found while writing the S05 specs of #988 (gHashTag/t27#3581); until now it lived only in the spec's FINDINGS. The vectors are replayed by tools/trinity_tri27.py in gHashTag/t27. Tracked in #1164.
Where:
tri_cpu.zigandexecutor.zigat 976df51.What happens.
Source:
MODULUS_NOTEinspecs/isa/tri27_machine.t27. The spec pins the value with the invariantthe_modulus_is_three_to_the_nine(line 335).Expected. Either the labels say 3^9, or the modulus becomes 3^27 if that was the intent. The two should not disagree.
Vector. No program vector, since the arithmetic is right and only the documentation is wrong. The spec's
the_modular_scalar_operationstest checks the value, e.g.mod_pos(-5, 19683) == 19678.Found while writing the S05 specs of #988 (gHashTag/t27#3581); until now it lived only in the spec's FINDINGS. The vectors are replayed by
tools/trinity_tri27.pyin gHashTag/t27. Tracked in #1164.