CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Need to type a formula

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
E_KARVELAs



Joined: 14 Feb 2007
Posts: 46
Location: Greece & Cyprus

View user's profile Send private message

Need to type a formula
PostPosted: Wed Apr 02, 2008 5:05 pm     Reply with quote

HI
i need to type the formula
But i have errors:
Code:


       float altimeter;

       long garo_long;

       altimeter=(1.0-(BARO_long/10132)^(0.19026) )*288.15)  /0.00198122;



Error Only integers are supported for this operation Sad
Is there any ather way i can type this formula on C.
Thanks
_________________
---- GREECE ----
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed Apr 02, 2008 5:25 pm     Reply with quote

Download the CCS manual. Keep it on your Windows desktop.
http://www.ccsinfo.com/downloads/CReferenceManual.pdf

Look in this section:
Quote:
BUILT-IN-FUNCTIONS

STANDARD
C MATH

You will see a list of 26 math functions. Look at the POW() function.
Your formula requires floating point math. Also look in the math.h file:
Quote:
c:\program files\picc\drivers\math.h
E_KARVELAs



Joined: 14 Feb 2007
Posts: 46
Location: Greece & Cyprus

View user's profile Send private message

PostPosted: Wed Apr 02, 2008 5:50 pm     Reply with quote

PCM programmer wrote:
Download the CCS manual. Keep it on your Windows desktop.
http://www.ccsinfo.com/downloads/CReferenceManual.pdf

Look in this section:
Quote:
BUILT-IN-FUNCTIONS

STANDARD
C MATH

You will see a list of 26 math functions. Look at the POW() function.
Your formula requires floating point math. Also look in the math.h file:
Quote:
c:\program files\picc\drivers\math.h


Thank u i advance issue fixed.Very Happy
Also did what u say from now i should read more carefully the manual Shocked there is a lot of info from i mentioned.
Something last WoW Surprised ROM memory increased 11% on pic18f4523 after including math.c
_________________
---- GREECE ----
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group