Could you send me the result of: $ printf '%.20f\n' 1.0 with your patch ? Bastien
On Thu, Jun 30, 2011 at 11:21 AM, Bastien ROUCARIES <[email protected]> wrote: > On Thu, Jun 30, 2011 at 9:36 AM, Christoph Nodes <[email protected]> wrote: >> On Wed, 29 Jun 2011 17:18:17 +0200 >> Bastien ROUCARIES <[email protected]> wrote: >> >>> On Wed, Jun 29, 2011 at 4:51 PM, Christoph Nodes >>> <[email protected]> wrote: >>> > On Wed, 29 Jun 2011 15:37:08 +0200 >>> > Bastien ROUCARIES <[email protected]> wrote: >>> > >>> >> Could you post also the printf patch and the rational for this >>> >> patch ? >>> >>> Do you know this bug? >>> http://sourceware.org/bugzilla/show_bug.cgi?id=5044 >>> >>> You could get the correct version without using your hack by doing >>> fesetround(mode) >>> and after using directly printf >> >> Thanks for the hint, but fesetround affects the rounding of >> the result of floating-point calculations not the rounding of printf. >> We only want to affect the printing. > > > The patch affect it during printf also. > > You could save round before printf, set rounding than restore it. > > With your patch even exact double like 1.0e0 are rounded up ! > > Bastien > >> >> >> Best regards, >> Christoph >> > -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected] Archive: http://lists.debian.org/[email protected]
