delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/09/27/13:08:14

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Message-ID: <5abc24640709271007w1533555cpd0a585942b5fbaf1@mail.gmail.com>
Date: Thu, 27 Sep 2007 13:07:49 -0400
From: "Andrew Louie" <louiea AT gmail DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: strange behavior with perl v 5.8.8
In-Reply-To: <183c528b0709270927v3dcc7d43hb9b53ee1fb19c120@mail.gmail.com>
MIME-Version: 1.0
References: <5abc24640709270814j5148c43ejbfe46f022fd6ad1b AT mail DOT gmail DOT com> <183c528b0709270927v3dcc7d43hb9b53ee1fb19c120 AT mail DOT gmail DOT com>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

On 9/27/07, Brian Mathis  wrote:
> On 9/27/07, Andrew Louie  wrote:
> > Hello,
> >
> > I've run into a strange adding problem with perl:
> >
> > when incrementing by 0.1 i get a strange behavior where at some
> > arbitrary  number, it will append 0.9999999999 to the end of the
> > number.
> >
>
> There's an excellent explanation of this (just posted today about the
> recently discovered Excel 2007 bug) here:
> http://www.joelonsoftware.com/items/2007/09/26b.html
>

thanks!
I never really thought about this before becuase it was never a problem.

anyway I was able to fix my problem with sprintf.

thanks for all the informative replies.


-- 
-Andrew Louie

--
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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019