Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT 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" To: Subject: SV: SV: Bug in printf ? Cc: In-Reply-To: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_8541_19733378.1120133556574" References: <20050630 DOT 202057 DOT 83613389 DOT haro AT kgt DOT co DOT jp> X-IsSubscribed: yes ------=_Part_8541_19733378.1120133556574 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 7bit Dave Korn [dave DOT korn AT artimi DOT com] wrote: > haro AT kgt DOT co DOT 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--