|
There are several things wrong here.
First of all is your formula. 1.0625^254 is 10222. Taking into account the rest of your formula, you are still nowhere near a range of 0 to 254.
Second, even if your formula did work mathematically, it uses floating point numbers, which the basic stamp doesn't support. It also uses an exponent, which you would have write code to support, because the stamp doesn't.
It is much easier (and probably faster) to figure out your algorithm (and test it using excel or another tool), and then implement it in a lookup table then to try to convert your algorithm to valid pbasic code.
PS, I like the choice of your scaling constant ;-)
|