thomasokken / free42

Free42 : An HP-42S Calculator Simulator
https://thomasokken.com/free42/
GNU General Public License v2.0
287 stars 55 forks source link

Calculating Pi on free42 dec #50

Closed erdosnew closed 2 years ago

erdosnew commented 2 years ago

hi, I downloaded 'pi_dec' program and tried to run on free42 but seems to result an error. Since the description states it won't work on free42 binary, i run it on Free42 Decimal but it doesn't produce value of PI.

https://thomasokken.com/free42/42progs/

i have stored an integer number in X and run XEQ 'Pi', results on screen displays ST X=11. x: 0.

I check registers (R |), and it displays 718,448,231.

thomasokken commented 2 years ago

When the program finishes, the results are in registers 04 and up. Register 04 will contain 3, and the following registers will contain the digits of the fraction, 10 digits per register.