[ECOS] double variable problems with ARM e7t?

Gary D. Thomas gary.thomas@mind.be
Mon May 26 07:24:00 GMT 2003


On Sun, 2003-05-25 at 06:43, F.T.Nilsson@hw.ac.uk wrote:
> Hi this is probably a stupid question but I cannot get double variables to 
> work with e7t
> 
> 
> I have included math.h and using 
> 
> double temp = pow(2,3) gives me a wrong answer
> 
> however if i use
> 
> int temp = pow(2,3) i get the right ans
> 
> can anyone tell me why

Did you include <math.h>?  If not, the compiler won't know that
pow() returns a floating point value.

> 
> any help aprechiated
> 
> cheers
> 
> fredrik
> 
> 
> ________________________________________________________________
> 
> DISCLAIMER:
> 
> This e-mail and any files transmitted with it are confidential
> and intended solely for the use of the individual or entity to
> whom it is addressed.  If you are not the intended recipient
> you are prohibited from using any of the information contained
> in this e-mail.  In such a case, please destroy all copies in
> your possession and notify the sender by reply e-mail.  Heriot
> Watt University does not accept liability or responsibility
> for changes made to this e-mail after it was sent, or for
> viruses transmitted through this e-mail.  Opinions, comments,
> conclusions and other information in this e-mail that do not
> relate to the official business of Heriot Watt University are
> not endorsed by it.
> ________________________________________________________________
-- 
Gary D. Thomas <gary.thomas@mind.be>


-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss



More information about the Ecos-discuss mailing list