Thread: Basic Math Help
View Single Post
  #15   Spotlight this post!  
Unread 16-02-2007, 02:57
Salik Syed Salik Syed is offline
Registered User
FRC #0701 (RoboVikes)
Team Role: Alumni
 
Join Date: Jan 2003
Rookie Year: 2001
Location: Stanford CA.
Posts: 514
Salik Syed has much to be proud ofSalik Syed has much to be proud ofSalik Syed has much to be proud ofSalik Syed has much to be proud ofSalik Syed has much to be proud ofSalik Syed has much to be proud ofSalik Syed has much to be proud ofSalik Syed has much to be proud ofSalik Syed has much to be proud of
Send a message via AIM to Salik Syed
Re: Basic Math Help

There is no reason to use floating point numbers,
Why not do this:
Code:
current_height=
(294010* pow( (49*(Get_Analog_Value(rc_ana_in01)) - 44),-10895)  )  ) / 10000 );
You will need to use a unsigned int for the first param of the pow function
to keep it from overflowing
__________________
Team 701