Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Date: Thu, 30 Jun 2005 14:12:36 +0200 (CEST)
Message-ID: <6879888.1120133556579.JavaMail.adm-moff@moffice2.nsc.no>
From: "Peter J. Acklam" <pjacklam@online.no>
To: <cygwin@cygwin.com>
Subject: SV: SV: Bug in printf ?
Cc: <pjacklam@online.no>
In-Reply-To: <SERRANOPL83mxMAKytt000002d1@SERRANO.CAM.ARTIMI.COM>
Mime-Version: 1.0
Content-Type: multipart/mixed;  	boundary="----=_Part_8541_19733378.1120133556574"
References: <20050630.202057.83613389.haro@kgt.co.jp>   <SERRANOPL83mxMAKytt000002d1@SERRANO.CAM.ARTIMI.COM>
X-IsSubscribed: yes

------=_Part_8541_19733378.1120133556574
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 7bit

Dave Korn [dave.korn@artimi.com] wrote:

> haro@kgt.co.jp wrote:
>
> > How come "0.125" gets printed as "0.12", and not "1.3"?
> 
> Absolutely, there's a rounding error of some sort.

For what it's worth: My Sunblade 100 running Solaris 9 has
Solaris' /bin/printf and GNU's printf as /usr/local/bin/printf
and both give "0.12", not "0.13".

I am quite sure it is the printf returning "0.13" that is buggy.
Note that the value "0.125" can be represented exactly with IEEE
double precision arithmetic, so inexact representation is not the
matter here.

Peter


------=_Part_8541_19733378.1120133556574
Content-Type: text/plain; charset=us-ascii

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/
------=_Part_8541_19733378.1120133556574--

