This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Re: One question.
- From: "Fabian Scheler" <fabian dot scheler at gmail dot com>
- To: "Zhao dot Green at inventec-inc dot com" <Zhao dot Green at inventec-inc dot com>
- Cc: ecos-discuss at ecos dot sourceware dot org
- Date: Wed, 31 May 2006 08:12:22 +0200
- Subject: Re: [ECOS] One question.
- References: <F7DDB0A5340F2D47966F7AD8DF5447E3013427DD@INC-MX8.inc.iac>
Double dnum1 = 1234567.1
Double dnum2 = 1234567
Double result = 0 ;
Result = dnum1-dnum2 ;
The result is 0.10000000009
Well, I guess this behaviour has nothing to do with eCos at all, I
think it depends on the floating point implementation you use, either
the library or the hardware - this error might be caused by rounding.
Ciao, Fabian
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss