[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] float and double
From: |
Jamie Morken |
Subject: |
Re: [avr-gcc-list] float and double |
Date: |
Wed, 24 Jul 2002 15:07:31 -0700 |
Hi Ted,
I am using AVR Studio 3.55 with the avr-gcc compiler
In case this is important here are the compile flags from the makefile:
Here is another piece of code that loses resolution:
(they are all floats)
lat_integer = 48;
lat_fraction = 0.429048;
current_lat = lat_integer + lat_fraction;
the simulator reports current_lat to be 48.429 instead of 48.429048
Is this the price I have to pay for using an 8bit uC?! :)
best regards,
Jamie Morken
----- Original Message -----
From: "Theodore Roth" <address@hidden>
To: "Jamie Morken" <address@hidden>
Sent: Wednesday, July 24, 2002 2:36 PM
Subject: Re: [avr-gcc-list] float and double
> Hi Jamie,
>
> Which simulator are you using?
>
> Ted Roth
>
> On Wed, 24 Jul 2002, Jamie Morken wrote:
>
> > Hi,
> >
> > I have been experimenting with the avr-gcc tools and have noticed that I
> > can
> > never have more than 6 digits with the float and double data types.
> > ie. if I do this in the code:
> > float temp9 = 3455322456.542234543;
> > The simulator will show this:
> > 3.45532E+009
> >
> > Never more than 6 digits :)
> >Is there a way to enable higher resolution?
>
>
>
>
avr-gcc-list at http://avr1.org