> You can get the product of two registers(x*y) by keeping an intermediate result and state register. Keeping the resulting product, by naming the first register for the result, prevents the accumulator grow too much in size:
:: r acc x y
:: iter acc > x iter
:: iter >
:: x y > r acc y
:: y > iter
:: x >
AC 8575 x^2 y^2
.. r^6
This one is harder to figure out. The first line reserves primes 2,3,5,7 for variables r, acc, x, y. The unreserved iter should then be assigned prime 11.
The accumulator AC starts at value 8575 = 5^2 * 7^3, so the y^2 has a typo and should be y^3. Which matches the desired end result of 2*3 = 6.
But how exactly does it get there?Btw, the corresponding FRACTRAN program would be
5*11 1 2*3*7 11 1
---- -- ----- -- -
3*11 11 5*7 7 5
For example, this machine takes two numbers and they are the numerator and denominator. Why on earth use ">" for the separator? That already has a mathematical meaning.
It's still used for some niche purposes.
https://www.tomshardware.com/news/iran-quantum-computer-arm-...