From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25587 invoked by alias); 9 Apr 2008 16:58:02 -0000 Received: (qmail 25557 invoked by uid 22791); 9 Apr 2008 16:58:00 -0000 X-Spam-Check-By: sourceware.org Received: from londo.lunn.ch (HELO londo.lunn.ch) (80.238.139.98) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 09 Apr 2008 16:57:42 +0000 Received: from lunn by londo.lunn.ch with local (Exim 3.36 #1 (Debian)) id 1Jjdby-0002I9-00; Wed, 09 Apr 2008 18:57:26 +0200 Date: Wed, 09 Apr 2008 18:24:00 -0000 From: Andrew Lunn To: Eduardo Sabaj Cc: ecos-discuss@ecos.sourceware.org Message-ID: <20080409165726.GB8526@lunn.ch> Mail-Followup-To: Eduardo Sabaj , ecos-discuss@ecos.sourceware.org References: <47FCE8F3.3060206@hasar.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <47FCE8F3.3060206@hasar.com> User-Agent: Mutt/1.5.17+20080114 (2008-01-14) X-IsSubscribed: yes Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Subject: Re: [ECOS] [Fwd: [ECOS] printf and floating point emulation] X-SW-Source: 2008-04/txt/msg00154.txt.bz2 On Wed, Apr 09, 2008 at 01:04:03PM -0300, Eduardo Sabaj wrote: > I found that the problem is the function vfnprint () located in > vfnprintf.cxx. It calls cvt() and this function calls modf(). This last > function seems to be the problem. This is the code extracted from cvt() : > ... > for (p = endp - 1; integer; ++expcnt) { > tmp = modf(integer / 10, &integer); > *p-- = to_char((int)((tmp + .01) * 10)); > } > ... > > This loop never ends! > > Am I omiting any patch? Please I need help. If you have any suggestion > write me as soon as you can. > Regards, > Eduardo Can you give a concrete example. Something like main() { printf("%.2f\n, 3.141539); } which causes the problem. Does the value being printed matter? What happens when you run the test program packages/language/c/libc/stdio/current/tests/sprintf1.c Thanks Andrew -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss