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 Message-ID: <42C3E2ED.3030305@elimpex.com> Date: Thu, 30 Jun 2005 14:17:49 +0200 From: Peter Mueller User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.2) Gecko/20040805 Netscape/7.2 MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: Bug in printf ? References: <20050630 DOT 194259 DOT 46635312 DOT haro AT kgt DOT co DOT jp> <6632806 DOT 1120129611257 DOT JavaMail DOT adm-moff AT moffice2 DOT nsc DOT no> <20050630 DOT 202057 DOT 83613389 DOT haro AT kgt DOT co DOT jp> <20050630 DOT 202554 DOT 129758646 DOT haro AT kgt DOT co DOT jp> <8864897 DOT 1120133151080 DOT JavaMail DOT adm-moff AT moffice2 DOT nsc DOT no> In-Reply-To: <8864897.1120133151080.JavaMail.adm-moff@moffice2.nsc.no> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Hi! Peter J. Acklam wrote: >haro AT kgt DOT co DOT jp wrote: > > > >>::How come "0.125" gets printed as "0.12", and not "1.3"? >> ^^^ "0.13", off cource ;-) >> >> > >Dealing with integers illustrates the matter more clearly. When >the decimal value is exactly 0.5, then printf should round to the >nearest *even* integer, as far as I know, so you should get > > Never heard of such a rule! As I learned it in school, 0.5 should allways be rounded to 1 . Bye, Peter WOTLmade -- 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/