[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] float and double
From: |
Theodore Roth |
Subject: |
Re: [avr-gcc-list] float and double |
Date: |
Wed, 24 Jul 2002 16:21:51 -0600 (MDT) |
It wouldn't surprise me if what you are seeing is just an artifact of the
simulator (or avr studio).
I'm not really familiar with avr floating point operations myself. I only
asked because I'm interested in how my simulavr program would handle it
(with gdb as front end).
Could you send me a simple (complete) program which demostrates this so I
can run it there simulavr/gdb and compare results?
Ted Roth
On Wed, 24 Jul 2002, Jamie Morken wrote:
:) 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
avr-gcc-list at http://avr1.org