View Single Post
  #3   Spotlight this post!  
Unread 30-01-2003, 10:27
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,574
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
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 ;-)