Re: strange behavior with perl v 5.8.8

2007-09-27 Thread Andrew Louie
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.99 to the end of the > > number. > > > > T

Re: strange behavior with perl v 5.8.8

2007-09-27 Thread Brian Mathis
On 9/27/07, Andrew Louie <[EMAIL PROTECTED]> 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.99 to the end of the > number. > There's an excellent explanation of

Re: strange behavior with perl v 5.8.8

2007-09-27 Thread Owen Rees
--On Thursday, September 27, 2007 11:14:09 AM -0400 Andrew Louie wrote: when incrementing by 0.1 i get a strange behavior where at some arbitrary number, it will append 0.99 to the end of the number. This is rounding error and applies to all computer systems and all programming langu

Re: strange behavior with perl v 5.8.8

2007-09-27 Thread Steve Holden
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.99 to the end of the number. test case: -

RE: strange behavior with perl v 5.8.8

2007-09-27 Thread Dave Korn
On 27 September 2007 16:14, Andrew Louie wrote: > Hello, > > I've run into a strange adding problem with perl: > > when incrementing by 0.1 ... an infinite, non-repeating fraction in binary floating-point, that can only be inexactly approximated ... > i get a strange behavior where at some >

Re: strange behavior with perl v 5.8.8

2007-09-27 Thread William Sutton
Nope, not a Cygwin specific issue. I get the same behavior at the same point on Gentoo perl 5.8.8 (x86 dual-Xeon), Debian Etch perl 5.8.8 (x86 P4), and SunOS 5.10 perl 5.8.4. William Sutton On Thu, 27 Sep 2007, Andrew Louie wrote: Hello, I've run into a strange adding problem with perl:

strange behavior with perl v 5.8.8

2007-09-27 Thread Andrew Louie
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.99 to the end of the number. test case: my $st