avr-gcc-list
[Top][All Lists]
Advanced

[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:10:15 -0700

woops! forgot the makefile line:

#compiler flags
 CPFLAGS = -g  -Os -Wall -Wstrict-prototypes -Wa,-ahlms=$(<:.c=.lst)


----- Original Message -----
From: "Jamie Morken" <address@hidden>
To: "Theodore Roth" <address@hidden>; <address@hidden>
Sent: Wednesday, July 24, 2002 3:07 PM
Subject: Re: [avr-gcc-list] float and double


> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]