This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: double variable problems with ARM e7t?
- From: "Gary D. Thomas" <gary dot thomas at mind dot be>
- To: F dot T dot Nilsson at hw dot ac dot uk
- Cc: eCos Discussion <ecos-discuss at sources dot redhat dot com>
- Date: 25 May 2003 11:34:54 -0600
- Subject: Re: [ECOS] double variable problems with ARM e7t?
- Organization:
- References: <1053866615.3ed0ba7732b8b@wmail2.hw.ac.uk>
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