From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23588 invoked by alias); 31 May 2006 06:12:29 -0000 Received: (qmail 23575 invoked by uid 22791); 31 May 2006 06:12:26 -0000 X-Spam-Check-By: sourceware.org Received: from nz-out-0102.google.com (HELO nz-out-0102.google.com) (64.233.162.202) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 31 May 2006 06:12:24 +0000 Received: by nz-out-0102.google.com with SMTP id n29so925234nzf for ; Tue, 30 May 2006 23:12:22 -0700 (PDT) Received: by 10.65.153.7 with SMTP id f7mr2519497qbo; Tue, 30 May 2006 23:12:22 -0700 (PDT) Received: by 10.64.199.17 with HTTP; Tue, 30 May 2006 23:12:22 -0700 (PDT) Message-ID: <69dd805e0605302312r30d4515x97947348eef9d6d0@mail.gmail.com> Date: Wed, 31 May 2006 06:12:00 -0000 From: "Fabian Scheler" To: "Zhao.Green@inventec-inc.com" Cc: ecos-discuss@ecos.sourceware.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: X-IsSubscribed: yes Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Subject: Re: [ECOS] One question. X-SW-Source: 2006-05/txt/msg00262.txt.bz2 > 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