|
|
|
Re: Calculator problem on ARM board | |
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
|
|
I thought I would throw my $0.02 in. I'm using gcc 4.0.0 from ELDK 4.1 for an AT91RM9200 (no fpu for those who don't recognize the chip). I ran the same program someone typed in previously. I used your arguments, below, and got precisely the correct result. I'm using NetWinder Floating Point Emulator V0.97 (double precision). # uname -a Linux mlx770 2.6.25 #1010 PREEMPT Thu Oct 23 15:58:42 EDT 2008 armv4tl unknown I don't know if this will help you or not, but it's another data point for you. Regards, - Matt On Wed, Nov 5, 2008 at 5:23 AM, kartikay Malhotra < kartikay.malhotra@xxxxxxxxx> wrote: > Hello All, > > I am facing a problem. I have a calculator application, which has 14 bit > screen. When I add two numbers, number1 += number2, where both number1 and > number2 are double, and one of the numbers is very large, and the other > number is small, I get an error in result. > > For example, 10000000000000 + 1 gives 1e+13, instead of 10000000000001. > This > is because the result string is actually 10000000000000.99. > > Is there a problem in the compiler, or is double precision arithmetic > incorrect? The same application complied for x86 gives no error. > > Any pointers would be helpful. > > Thanks & Regards > Er. KM > ------------------------------------------------------------------- > List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm > FAQ: http://www.arm.linux.org.uk/mailinglists/faq.php > Etiquette: http://www.arm.linux.org.uk/mailinglists/etiquette.php > ------------------------------------------------------------------- List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm FAQ: http://www.arm.linux.org.uk/mailinglists/faq.php Etiquette: http://www.arm.linux.org.uk/mailinglists/etiquette.php
[Linux ARM] [Linux ARM MSM] [Linux ARM Kernel] [Fedora ARM] [IETF Annouce] [Security] [Bugtraq] [Linux] [Linux OMAP] [Linux MIPS] [ECOS] [Asterisk Internet PBX] [Linux API]
![]() |
![]() |