16
Darwinbots3 / Make v3 support decimals
« on: May 15, 2008, 06:49:30 PM »
Well, here it is. It took me way too long make, so I hope it helps. If not, at least I've proven it can be done. It's accuracy varies quite a bit. I haven't done extensive testing on it's limits etc.
It takes the first number (20) and approximates it's cube root and stores it in 61. It displays 3 decimals. Ie. for 1331 (11^3) it gives 10882 (as opposed to 11000) and for 20 it gives 2693 (should be 2714).
It takes the first number (20) and approximates it's cube root and stores it in 61. It displays 3 decimals. Ie. for 1331 (11^3) it gives 10882 (as opposed to 11000) and for 20 it gives 2693 (should be 2714).
Code: [Select]
20
10000 mult sqr
10000 mult sqr
dup
10 mult sqr
10000 mult sqr
mult 1000 div dup
10 mult sqr
10000 mult sqr
10 mult sqr
10000 mult sqr
mult 1000 div 61 store