Debian bug report logs - #1732, boring messages


Message sent to debian-devel@pixar.com:


Subject: Bug#1732: Bad arithmetic in new perl packages
Reply-To: Fernando <alegre@mars.superlink.net>, debian-bugs@pixar.com
Resent-From: Fernando <alegre@mars.superlink.net>
Resent-To: debian-devel@pixar.com
Resent-Date: Sun, 22 Oct 1995 16:48:01 GMT
Resent-Message-ID: <debian-bugs-handler.1732.B10221639110@pixar.com>
Resent-Sender: iwj10@cus.cam.ac.uk
X-Debian-PR-Package: 
X-Debian-PR-Keywords: 
Received: via spool for debian-bugs; Sun, 22 Oct 1995 16:48:01 GMT
Received: with rfc822 via encapsulated-mail; Sun, 22 Oct 1995 16:39:09 GMT
Received: from pixar.com by mongo.pixar.com with smtp
	(Smail3.1.28.1 #15) id m0t73Oo-0006PjC; Sun, 22 Oct 95 09:37 PDT
Received: from jupiter.superlink.net by pixar.com with SMTP id AA26129
  (5.67b/IDA-1.5 for debian-bugs-pipe@mongo.pixar.com); Sun, 22 Oct 1995 09:36:59 -0700
Received: from earth.superlink.net (earth.superlink.net [204.97.220.6]) by jupiter.superlink.net (8.6.12/8.6.12) with ESMTP id MAA10007 for <@jupiter.superlink.net:debian-bugs@pixar.com>; Sun, 22 Oct 1995 12:36:53 -0400
Received: from mars.superlink.net by earth.superlink.net via ESMTP (950215.SGI.8.6.10/940406.SGI.AUTO)
	for <@jupiter.superlink.net:debian-bugs@pixar.com> id MAA06871; Sun, 22 Oct 1995 12:58:27 -0400
Received: by mars.superlink.net (950511.SGI.8.6.12.PATCH526/940406.SGI)
	 id MAA19702; Sun, 22 Oct 1995 12:40:48 -0400
Date: Sun, 22 Oct 1995 12:40:47 -0400 (EDT)
From: Fernando <alegre@mars.superlink.net>
To: debian-bugs@pixar.com
Message-Id: <Pine.SGI.3.91.951022123527.19473A-100000@mars.superlink.net>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII


Pakckage: perl
Version: 5.001-5
Notes: tried a.out only, happens also with 5.001-4, however 5.001-3 is OK

Perl seems to be confused making some arithmetic operations (additions).
Sometimes the result of $a+=$b, when $a is 0 and $b is 2 happens to be
2.000004192 or something similar.



Message sent:


From: iwj10@thor.cam.ac.uk (Ian Jackson)
To: Fernando <alegre@mars.superlink.net>
Subject: Bug#1732: Acknowledgement (was: Bad arithmetic in new perl packages)
In-Reply-To: <Pine.SGI.3.91.951022123527.19473A-100000@mars.superlink.net>
References: <Pine.SGI.3.91.951022123527.19473A-100000@mars.superlink.net>

Thank you for the problem report you have sent regarding Debian GNU/Linux.
This is an automatically generated reply, to let you know your message has
been received.  It is being forwarded to the developers' mailing list for
their attention; they will reply in due course.

If you wish to submit further information on your problem, please send
it to debian-bugs@pixar.com, but please ensure that the Subject
line of your message starts with "Bug#1732" or "Re: Bug#1732" so that
we can identify it as relating to the same problem.

Please do not reply to the address at the top of this message,
unless you wish to report a problem with the bug-tracking system.

Your message didn't have a Package: line at the start (in the
pseudo-header following the real mail header), or didn't have a
psuedo-header at all.

This makes it much harder for us to categorise and deal with your
problem report; please ensure that you say which package(s) and
version(s) the problem is with next time.  Some time in the future the
problem reports system may start rejecting such messages.

Ian Jackson
(maintainer, debian-bugs)


Message sent to debian-devel@pixar.com:


Subject: Bug#1732: Bad arithmetic in new perl packages
Reply-To: jdassen@WI.LeidenUniv.NL (J.H.M.Dassen), debian-bugs@pixar.com
Resent-From: jdassen@WI.LeidenUniv.NL (J.H.M.Dassen)
Resent-To: debian-devel@pixar.com
Resent-Date: Sun, 22 Oct 1995 17:18:01 GMT
Resent-Message-ID: <debian-bugs-handler.1732.B10221710060@pixar.com>
Resent-Sender: iwj10@cus.cam.ac.uk
X-Debian-PR-Package: 
X-Debian-PR-Keywords: 
Received: via spool for debian-bugs; Sun, 22 Oct 1995 17:18:01 GMT
Received: with rfc822 via encapsulated-mail; Sun, 22 Oct 1995 17:10:04 GMT
Received: from pixar.com by mongo.pixar.com with smtp
	(Smail3.1.28.1 #15) id m0t73qF-000B1tC; Sun, 22 Oct 95 10:05 PDT
Received: from mailhost.WI.LeidenUniv.NL (zeus128.wi.leidenuniv.nl) by pixar.com with SMTP id AA26601
  (5.67b/IDA-1.5 for debian-bugs-pipe@mongo.pixar.com); Sun, 22 Oct 1995 09:57:54 -0700
Received: from ind143a.wi.leidenuniv.nl (jdassen@ind143a [132.229.128.229])
          by mailhost.WI.LeidenUniv.NL (8.6.10a/SBH-1.20.1-M) with ESMTP id RAA18014
          Sun, 22 Oct 1995 17:57:34 +0100 (MET)
From: jdassen@WI.LeidenUniv.NL (J.H.M.Dassen)
Organization: Leiden University,
              Dept. of Mathematics & Computer Science,
              The Netherlands
Received: from  (jdassen@localhost)
          by ind143a.wi.leidenuniv.nl (8.6.9/FHM-1.03-S) id QAA21984
          Sun, 22 Oct 1995 16:57:32 GMT (MET)
Message-Id: <199510221657.QAA21984@ind143a.wi.leidenuniv.nl>
To: alegre@mars.superlink.net, debian-bugs@pixar.com, perl5-porters@nicoh.com
Date: Sun, 22 Oct 1995 17:57:31 +0100 (MET)
In-Reply-To: <Pine.SGI.3.91.951022123527.19473A-100000@mars.superlink.net> from "Fernando" at Oct 22, 95 12:40:47 pm
Return-Receipt-To: jdassen@WI.LeidenUniv.NL
X-Home-Page: <URL:http://www.wi.leidenuniv.nl/home/jdassen>
X-Mailer: ELM [version 2.4 PL24 (modified)]
Content-Type: text
Content-Length: 862

Fernando wrote to debian-bugs:
> Pakckage: perl
> Version: 5.001-5
(perl5-porters, this is 5.001m without additional packages).

> Notes: tried a.out only, happens also with 5.001-4, however 5.001-3 is OK
(5.001-3 == 5.001e).

> Perl seems to be confused making some arithmetic operations (additions).
> Sometimes the result of $a+=$b, when $a is 0 and $b is 2 happens to be
> 2.000004192 or something similar.

Fernando, I unfortunately have no idea what is causing this. Please
provide a short script which shows this behaviour (reliably if possible).

Perl5-porters, is this a known bug?

Ray
--
PATRIOTISM  A great British writer once said that if he had to choose
between betraying his country and betraying a friend he hoped he would
have the decency to betray his country.
- The Hipcrime Vocab by Chad C. Mulligan


Message sent:


From: iwj10@thor.cam.ac.uk (Ian Jackson)
To: jdassen@WI.LeidenUniv.NL (J.H.M.Dassen)
Subject: Bug#1732: Info received (was Bug#1732: Bad arithmetic in new perl packages)
In-Reply-To: <199510221657.QAA21984@ind143a.wi.leidenuniv.nl>
References: <199510221657.QAA21984@ind143a.wi.leidenuniv.nl>

Thank you for the additional information you have supplied regarding
this problem report.  It has been forwarded to the developers to
accompany the original report.

If you wish to continue to submit further information on your problem,
please do the same thing again: send it to debian-bugs@pixar.com, ensuring
that the Subject line starts with "Bug#1732" or "Re: Bug#1732" so that
we can identify it as relating to the same problem.

Please do not reply to the address at the top of this message,
unless you wish to report a problem with the bug-tracking system.

Ian Jackson
(maintainer, debian-bugs)


Message sent to debian-devel@pixar.com:


Subject: Bug#1732: Bad arithmetic in new perl packages
Reply-To: Andy Dougherty <doughera@lafcol.lafayette.edu>, debian-bugs@pixar.com
Resent-From: Andy Dougherty <doughera@lafcol.lafayette.edu>
Orignal-Sender: Andy Dougherty <doughera@lafcol.lafayette.edu>
Resent-To: debian-devel@pixar.com
Resent-Date: Sun, 22 Oct 1995 19:48:02 GMT
Resent-Message-ID: <debian-bugs-handler.1732.B10221946270@pixar.com>
Resent-Sender: iwj10@cus.cam.ac.uk
X-Debian-PR-Package: 
X-Debian-PR-Keywords: 
Received: via spool for debian-bugs; Sun, 22 Oct 1995 19:48:02 GMT
Received: with rfc822 via encapsulated-mail; Sun, 22 Oct 1995 19:46:25 GMT
Received: from pixar.com by mongo.pixar.com with smtp
	(Smail3.1.28.1 #15) id m0t76KD-0006HCC; Sun, 22 Oct 95 12:44 PDT
Received: from lafcol.lafayette.edu by pixar.com with SMTP id AA05469
  (5.67b/IDA-1.5 for debian-bugs-pipe@mongo.pixar.com); Sun, 22 Oct 1995 12:43:57 -0700
Received: by lafcol.lafayette.edu (4.1/SMI-4.1)
	id AA17910; Sun, 22 Oct 95 15:44:12 EDT
Date: Sun, 22 Oct 1995 15:44:11 -0400 (EDT)
From: Andy Dougherty <doughera@lafcol.lafayette.edu>
Sender: Andy Dougherty <doughera@lafcol.lafayette.edu>
To: "J.H.M.Dassen" <jdassen@WI.LeidenUniv.NL>
Cc: alegre@mars.superlink.net, debian-bugs@pixar.com,
        perl5-porters@africa.nicoh.com
In-Reply-To: <199510221657.QAA21984@ind143a.wi.leidenuniv.nl>
Message-Id: <Pine.3.89.9510221526.A17809-0100000@lafcol>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; CHARSET=US-ASCII

On Sun, 22 Oct 1995, J.H.M.Dassen wrote:

> Fernando wrote to debian-bugs:
(problem with 5.001m, but not 5.001e)

> > Perl seems to be confused making some arithmetic operations (additions).
> > Sometimes the result of $a+=$b, when $a is 0 and $b is 2 happens to be
> > 2.000004192 or something similar.

Without seeing a short example script, it's dangerous to guess, but I'll do
so anyway.

There is a very subtle bug that can arise in some rare situations where
perl has to convert back and forth between string and floating point
representations, but that's almost certainly not the problem here.

I also can't think of anything in 5.001m (as opposed to 5.001e) that
might have affected this.

I'd guess one of two things is going on:

1.  This is the usual sort of problem that arises when folks forget
that floating point arithmetic isn't exact.  Perl5 is pretty forgiving,
and tries hard to print what you want, but doesn't always succeed.

2.  The tests are running on a buggy pentium :-).
> Fernando, I unfortunately have no idea what is causing this. Please
> provide a short script which shows this behaviour (reliably if possible).

    Andy Dougherty		doughera@lafcol.lafayette.edu
    Dept. of Physics
    Lafayette College, Easton PA 18042




Message sent:


From: iwj10@thor.cam.ac.uk (Ian Jackson)
To: Andy Dougherty <doughera@lafcol.lafayette.edu>
Subject: Bug#1732: Info received (was Bug#1732: Bad arithmetic in new perl packages)
In-Reply-To: <Pine.3.89.9510221526.A17809-0100000@lafcol>
References: <Pine.3.89.9510221526.A17809-0100000@lafcol>

Thank you for the additional information you have supplied regarding
this problem report.  It has been forwarded to the developers to
accompany the original report.

If you wish to continue to submit further information on your problem,
please do the same thing again: send it to debian-bugs@pixar.com, ensuring
that the Subject line starts with "Bug#1732" or "Re: Bug#1732" so that
we can identify it as relating to the same problem.

Please do not reply to the address at the top of this message,
unless you wish to report a problem with the bug-tracking system.

Ian Jackson
(maintainer, debian-bugs)


Message sent to debian-devel@pixar.com:


Subject: Bug#1732: Bad arithmetic in new perl packages
Reply-To: Larry Wall <lwall@scalpel.netlabs.com>, debian-bugs@pixar.com
Resent-From: Larry Wall <lwall@scalpel.netlabs.com>
Resent-To: debian-devel@pixar.com
Resent-Date: Mon, 23 Oct 1995 19:03:01 GMT
Resent-Message-ID: <debian-bugs-handler.1732.B10231857010@pixar.com>
Resent-Sender: iwj10@cus.cam.ac.uk
X-Debian-PR-Package: 
X-Debian-PR-Keywords: 
Received: via spool for debian-bugs; Mon, 23 Oct 1995 19:03:01 GMT
Received: with rfc822 via encapsulated-mail; Mon, 23 Oct 1995 18:56:59 GMT
Received: from pixar.com by mongo.pixar.com with smtp
	(Smail3.1.28.1 #15) id m0t7S1a-0005lrC; Mon, 23 Oct 95 11:55 PDT
Received: from proxy.netlabs.com (ns.netlabs.com) by pixar.com with SMTP id AA12485
  (5.67b/IDA-1.5 for debian-bugs-pipe@mongo.pixar.com); Mon, 23 Oct 1995 11:54:34 -0700
Received: by proxy.netlabs.com (4.1/SMI-4.1)
	id AA07250; Mon, 23 Oct 95 11:53:41 PDT
Received: from vaccine-bb.netlabs.com(192.190.199.1) by proxy.netlabs.com via smap (V1.3)
	id sma007248; Mon Oct 23 11:53:39 1995
Received: from scalpel.netlabs.com by netlabs.com (4.1/SMI-4.1)
	id AA21665; Mon, 23 Oct 95 11:50:37 PDT
Received: from localhost.netlabs.com by scalpel.netlabs.com (4.1/SMI-4.1)
	id AA09797; Mon, 23 Oct 95 11:49:18 PDT
Message-Id: <9510231849.AA09797@scalpel.netlabs.com>
To: jdassen@WI.LeidenUniv.NL (J.H.M.Dassen)
Cc: alegre@mars.superlink.net, debian-bugs@pixar.com,
        perl5-porters@africa.nicoh.com
In-Reply-To: Your message of "Sun, 22 Oct 95 17:57:31 BST."
             <199510221657.QAA21984@ind143a.wi.leidenuniv.nl>
Date: Mon, 23 Oct 95 11:49:00 -0700
From: Larry Wall <lwall@scalpel.netlabs.com>

: Fernando wrote to debian-bugs:
: > Pakckage: perl
: > Version: 5.001-5
: (perl5-porters, this is 5.001m without additional packages).
:
: > Notes: tried a.out only, happens also with 5.001-4, however 5.001-3 is OK
: (5.001-3 == 5.001e).
:
: > Perl seems to be confused making some arithmetic operations (additions).
: > Sometimes the result of $a+=$b, when $a is 0 and $b is 2 happens to be
: > 2.000004192 or something similar.
:
: Fernando, I unfortunately have no idea what is causing this. Please
: provide a short script which shows this behaviour (reliably if possible).
:
: Perl5-porters, is this a known bug?

No.  Another possibility is that the compiler is using single-precision
instead of double-precision floats.  I think you get about 7 digits of
accuracy in single precision.

Larry


Message sent:


From: iwj10@thor.cam.ac.uk (Ian Jackson)
To: Larry Wall <lwall@scalpel.netlabs.com>
Subject: Bug#1732: Info received (was Bug#1732: Bad arithmetic in new perl packages)
In-Reply-To: <9510231849.AA09797@scalpel.netlabs.com>
References: <9510231849.AA09797@scalpel.netlabs.com>

Thank you for the additional information you have supplied regarding
this problem report.  It has been forwarded to the developers to
accompany the original report.

If you wish to continue to submit further information on your problem,
please do the same thing again: send it to debian-bugs@pixar.com, ensuring
that the Subject line starts with "Bug#1732" or "Re: Bug#1732" so that
we can identify it as relating to the same problem.

Please do not reply to the address at the top of this message,
unless you wish to report a problem with the bug-tracking system.

Ian Jackson
(maintainer, debian-bugs)


Message sent to debian-devel@pixar.com:


Subject: Bug#1732: Bad arithmetic in new perl packages (fwd)
Reply-To: jdassen@WI.LeidenUniv.NL (J.H.M.Dassen), debian-bugs@pixar.com
Resent-From: jdassen@WI.LeidenUniv.NL (J.H.M.Dassen)
Resent-To: debian-devel@pixar.com
Resent-Date: Tue, 24 Oct 1995 07:48:02 GMT
Resent-Message-ID: <debian-bugs-handler.1732.B10240746550@pixar.com>
Resent-Sender: iwj10@cus.cam.ac.uk
X-Debian-PR-Package: 
X-Debian-PR-Keywords: 
Received: via spool for debian-bugs; Tue, 24 Oct 1995 07:48:02 GMT
Received: with rfc822 via encapsulated-mail; Tue, 24 Oct 1995 07:46:53 GMT
Received: from pixar.com by mongo.pixar.com with smtp
	(Smail3.1.28.1 #15) id m0t7e3K-0006FZC; Tue, 24 Oct 95 00:45 PDT
Received: from mailhost.WI.LeidenUniv.NL (zeus128.wi.leidenuniv.nl) by pixar.com with SMTP id AA20451
  (5.67b/IDA-1.5 for debian-bugs-pipe@mongo.pixar.com); Tue, 24 Oct 1995 00:44:57 -0700
Received: from ind206aa.wi.leidenuniv.nl (jdassen@ind206aa [132.229.128.222])
          by mailhost.WI.LeidenUniv.NL (8.6.10a/SBH-1.20.1-M) with ESMTP id IAA25038
          Tue, 24 Oct 1995 08:45:18 +0100 (MET)
From: jdassen@WI.LeidenUniv.NL (J.H.M.Dassen)
Organization: Leiden University,
              Dept. of Mathematics & Computer Science,
              The Netherlands
Received: from  (jdassen@localhost)
          by ind206aa.wi.leidenuniv.nl (8.6.9/FHM-1.03-S) id HAA28263
          Tue, 24 Oct 1995 07:45:17 GMT (MET)
Message-Id: <199510240745.HAA28263@ind206aa.wi.leidenuniv.nl>
To: perl5-porters@nicoh.com, debian-bugs@pixar.com
Date: Tue, 24 Oct 1995 08:45:17 +0100 (MET)
Return-Receipt-To: jdassen@WI.LeidenUniv.NL
X-Home-Page: <URL:http://www.wi.leidenuniv.nl/home/jdassen>
X-Mailer: ELM [version 2.4 PL24 (modified)]
Content-Type: text
Content-Length: 1772

Forwarded message:
>From alegre@mars.superlink.net  Mon Oct 23 17:47:44 1995
Date: Mon, 23 Oct 1995 12:47:22 -0400 (EDT)
From: Fernando <alegre@mars.superlink.net>
To: "J.H.M.Dassen" <jdassen@WI.LeidenUniv.NL>
Subject: Re: Bug#1732: Bad arithmetic in new perl packages
In-Reply-To: <199510221657.QAA21984@ind143a.wi.leidenuniv.nl>
Message-ID: <Pine.SGI.3.91.951023124508.27119A-100000@mars.superlink.net>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII


While trying to isolate the bug in perl-5.001-5  I managed to reproduce it
also with perl-5.001-3, although the output is not exactly the same.
I have tried the script below in two machines (a 386SX and a 486DX) with
the same result. It seems to be some conversion problem. It happens more
often in perl-5.001m because I noticed when I upgraded and my scripts
started to fail.

This is the test script:

------------------------------------------------------------
#!/usr/bin/perl

@array=(
"item1 4 units",
"item2 1.5 units",
"item3 8 units + see item2"
);

foreach (@array) {
	if( ($item_name,$amount,$unit,$delimiter,$moreinfo)=
		/^(\w+)\s*([\d\.]+)\s*(\w+)\s*(\+|$)\s*(.*)/) {
		$total+=$amount;
		}
	}

$Total=$total;
print "total=$total\n";
print "Total=$Total\n";
-----------------------------------------------------------------

Output from perl-5.001-5:
total=13.5
Total=13.5000000003576

Output from perl-5.001-3:
total=13.5
Total=13.5000000005364

Thanks,
	Fernando.


--
J.H.M. Dassen                 | RUMOUR  Believe all you hear. Your world may
jDassen@wi.LeidenUniv.Nl      | not be a better one than the one the blocks
Dassen@stpc.wi.LeidenUniv.Nl  | live in but it'll be a sight more vivid.
                              |     - The Hipcrime Vocab by Chad C. Mulligan


Message sent:


From: iwj10@thor.cam.ac.uk (Ian Jackson)
To: jdassen@WI.LeidenUniv.NL (J.H.M.Dassen)
Subject: Bug#1732: Info received (was Bug#1732: Bad arithmetic in new perl packages (fwd))
In-Reply-To: <199510240745.HAA28263@ind206aa.wi.leidenuniv.nl>
References: <199510240745.HAA28263@ind206aa.wi.leidenuniv.nl>

Thank you for the additional information you have supplied regarding
this problem report.  It has been forwarded to the developers to
accompany the original report.

If you wish to continue to submit further information on your problem,
please do the same thing again: send it to debian-bugs@pixar.com, ensuring
that the Subject line starts with "Bug#1732" or "Re: Bug#1732" so that
we can identify it as relating to the same problem.

Please do not reply to the address at the top of this message,
unless you wish to report a problem with the bug-tracking system.

Ian Jackson
(maintainer, debian-bugs)


Message sent to debian-devel@pixar.com:


Subject: Bug#1732: Bad arithmetic in new perl packages (fwd)
Reply-To: Ilya Zakharevich <ilya@math.ohio-state.edu>, debian-bugs@pixar.com
Resent-From: Ilya Zakharevich <ilya@math.ohio-state.edu>
Resent-To: debian-devel@pixar.com
Resent-Date: Tue, 24 Oct 1995 08:18:01 GMT
Resent-Message-ID: <debian-bugs-handler.1732.B10240811020@pixar.com>
Resent-Sender: iwj10@cus.cam.ac.uk
X-Debian-PR-Package: 
X-Debian-PR-Keywords: 
Received: via spool for debian-bugs; Tue, 24 Oct 1995 08:18:01 GMT
Received: with rfc822 via encapsulated-mail; Tue, 24 Oct 1995 08:11:00 GMT
Received: from pixar.com by mongo.pixar.com with smtp
	(Smail3.1.28.1 #15) id m0t7eQj-0005xYC; Tue, 24 Oct 95 01:09 PDT
Received: from monk.mps.ohio-state.edu by pixar.com with SMTP id AA21760
  (5.67b/IDA-1.5 for debian-bugs-pipe@mongo.pixar.com); Tue, 24 Oct 1995 01:09:23 -0700
Received: (from ilya@localhost) by monk.mps.ohio-state.edu (8.6.12/8.6.12) id EAA26616; Tue, 24 Oct 1995 04:09:13 -0400
From: Ilya Zakharevich <ilya@math.ohio-state.edu>
Message-Id: <199510240809.EAA26616@monk.mps.ohio-state.edu>
To: jdassen@WI.LeidenUniv.NL (J.H.M.Dassen)
Date: Tue, 24 Oct 1995 04:09:13 -0400 (EDT)
Cc: perl5-porters@africa.nicoh.com, debian-bugs@pixar.com
In-Reply-To: <199510240745.HAA28263@ind206aa.wi.leidenuniv.nl> from "J.H.M.Dassen" at Oct 24, 95 08:45:17 am
X-Mailer: ELM [version 2.4 PL24]
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Content-Length: 814

J.H.M.Dassen writes:
> ------------------------------------------------------------
> #!/usr/bin/perl
>
> @array=(
> "item1 4 units",
> "item2 1.5 units",
> "item3 8 units + see item2"
> );
>
> foreach (@array) {
> 	if( ($item_name,$amount,$unit,$delimiter,$moreinfo)=
> 		/^(\w+)\s*([\d\.]+)\s*(\w+)\s*(\+|$)\s*(.*)/) {
> 		$total+=$amount;
> 		}
> 	}
>
> $Total=$total;
> print "total=$total\n";
> print "Total=$Total\n";
> -----------------------------------------------------------------
>
> Output from perl-5.001-5:
> total=13.5
> Total=13.5000000003576
>
> Output from perl-5.001-3:
> total=13.5
> Total=13.5000000005364
>

No problem here, OS/2, 486/66x2 (1.5 years old).

It would help if you report the version of perl (perl -v) (there is no
such guy as 5.001-5), OS, compiler. Run myconfig.

Ilya


Message sent:


From: iwj10@thor.cam.ac.uk (Ian Jackson)
To: Ilya Zakharevich <ilya@math.ohio-state.edu>
Subject: Bug#1732: Info received (was Bug#1732: Bad arithmetic in new perl packages (fwd))
In-Reply-To: <199510240809.EAA26616@monk.mps.ohio-state.edu>
References: <199510240809.EAA26616@monk.mps.ohio-state.edu>

Thank you for the additional information you have supplied regarding
this problem report.  It has been forwarded to the developers to
accompany the original report.

If you wish to continue to submit further information on your problem,
please do the same thing again: send it to debian-bugs@pixar.com, ensuring
that the Subject line starts with "Bug#1732" or "Re: Bug#1732" so that
we can identify it as relating to the same problem.

Please do not reply to the address at the top of this message,
unless you wish to report a problem with the bug-tracking system.

Ian Jackson
(maintainer, debian-bugs)


Message sent to debian-devel@pixar.com:


Subject: Bug#1732: Bad arithmetic in new perl packages
Reply-To: jdassen@WI.LeidenUniv.NL (J.H.M.Dassen), debian-bugs@pixar.com
Resent-From: jdassen@WI.LeidenUniv.NL (J.H.M.Dassen)
Resent-To: debian-devel@pixar.com
Resent-Date: Tue, 24 Oct 1995 08:18:05 GMT
Resent-Message-ID: <debian-bugs-handler.1732.B10240813370@pixar.com>
Resent-Sender: iwj10@cus.cam.ac.uk
X-Debian-PR-Package: 
X-Debian-PR-Keywords: 
Received: via spool for debian-bugs; Tue, 24 Oct 1995 08:18:05 GMT
Received: with rfc822 via encapsulated-mail; Tue, 24 Oct 1995 08:13:35 GMT
Received: from pixar.com by mongo.pixar.com with smtp
	(Smail3.1.28.1 #15) id m0t7eT9-0005xYC; Tue, 24 Oct 95 01:12 PDT
Received: from mailhost.WI.LeidenUniv.NL (zeus128.wi.leidenuniv.nl) by pixar.com with SMTP id AA21934
  (5.67b/IDA-1.5 for debian-bugs-pipe@mongo.pixar.com); Tue, 24 Oct 1995 01:10:52 -0700
Received: from ind206aa.wi.leidenuniv.nl (jdassen@ind206aa [132.229.128.222])
          by mailhost.WI.LeidenUniv.NL (8.6.10a/SBH-1.20.1-M) with ESMTP id JAA25470
          Tue, 24 Oct 1995 09:11:13 +0100 (MET)
From: jdassen@WI.LeidenUniv.NL (J.H.M.Dassen)
Organization: Leiden University,
              Dept. of Mathematics & Computer Science,
              The Netherlands
Received: from  (jdassen@localhost)
          by ind206aa.wi.leidenuniv.nl (8.6.9/FHM-1.03-S) id IAA28563
          Tue, 24 Oct 1995 08:11:12 GMT (MET)
Message-Id: <199510240811.IAA28563@ind206aa.wi.leidenuniv.nl>
To: lwall@scalpel.netlabs.com, perl5-porters@nicoh.com
Date: Tue, 24 Oct 1995 09:11:12 +0100 (MET)
Cc: debian-bugs@pixar.com
In-Reply-To: <9510231849.AA09797@scalpel.netlabs.com> from "Larry Wall" at Oct 23, 95 11:49:00 am
Return-Receipt-To: jdassen@WI.LeidenUniv.NL
X-Home-Page: <URL:http://www.wi.leidenuniv.nl/home/jdassen>
X-Mailer: ELM [version 2.4 PL24 (modified)]
Content-Type: text
Content-Length: 1555

> : > Perl seems to be confused making some arithmetic operations (additions).
> : > Sometimes the result of $a+=$b, when $a is 0 and $b is 2 happens to be
> : > 2.000004192 or something similar.
> :
> : Fernando, I unfortunately have no idea what is causing this. Please
> : provide a short script which shows this behaviour (reliably if possible).
> :
> : Perl5-porters, is this a known bug?
>
> No.  Another possibility is that the compiler is using single-precision
> instead of double-precision floats.  I think you get about 7 digits of
> accuracy in single precision.

Larry, I've forwarded Fernando's script to perl5-porters.

The perl5 package was compiled using Debian's gcc package (gcc 2.6.3)
in a.out binary format using '-O2 -fomit-frame-pointer' optimization;
the libc is Linux libc-4.6.27.

The output differs in the 10th decimal. The weird thing is that it
appears when copying the value.

I cannot reproduce the bug on the following configurations:
FreeBSD 2.1.0,	perl 5.001m
SunOS 4.1.4,	perl 5.000
HP-UX 9,	perl 5.000
IRIX 5.3,	perl 5.000

perl5-porters, please try to reproduce this
- on an non-linux system (with 5.001m)
- on a linux system (with a non-debian 5.001m)
- on a debian linux system under ELF   (my home-machine is not net.connected).

Regards,
Ray
--
LEADERSHIP  A form of self-preservation exhibited by people with auto-
destructive imaginations in order to ensure that when it comes to the crunch
it'll be someone else's bones which go crack and not their own.
- The Hipcrime Vocab by Chad C. Mulligan


Message sent:


From: iwj10@thor.cam.ac.uk (Ian Jackson)
To: jdassen@WI.LeidenUniv.NL (J.H.M.Dassen)
Subject: Bug#1732: Info received (was Bug#1732: Bad arithmetic in new perl packages)
In-Reply-To: <199510240811.IAA28563@ind206aa.wi.leidenuniv.nl>
References: <199510240811.IAA28563@ind206aa.wi.leidenuniv.nl>

Thank you for the additional information you have supplied regarding
this problem report.  It has been forwarded to the developers to
accompany the original report.

If you wish to continue to submit further information on your problem,
please do the same thing again: send it to debian-bugs@pixar.com, ensuring
that the Subject line starts with "Bug#1732" or "Re: Bug#1732" so that
we can identify it as relating to the same problem.

Please do not reply to the address at the top of this message,
unless you wish to report a problem with the bug-tracking system.

Ian Jackson
(maintainer, debian-bugs)


Message received at debian-bugs-request:


From chiark.chu.cam.ac.uk!ian Sat Oct 28 07:27:44 1995
Return-Path: <ian@chiark.chu.cam.ac.uk>
Received: from pixar.com by mongo.pixar.com with smtp
	(Smail3.1.28.1 #15) id m0t9CEZ-000DG9C; Sat, 28 Oct 95 07:27 PDT
Received: from artemis.chu.cam.ac.uk by pixar.com with SMTP id AA10950
  (5.67b/IDA-1.5 for debian-bugs-request-pipe@mongo.pixar.com); Sat, 28 Oct 1995 07:27:14 -0700
Received: from chiark.chu.cam.ac.uk by artemis.chu.cam.ac.uk with smtp
	(Smail3.1.29.1 #33) id m0t9C7j-0007uRC; Sat, 28 Oct 95 14:20 GMT
Received: by chiark.chu.cam.ac.uk
	id m0t9C7h-0002bkC
	(Debian /\oo/\ Smail3.1.29.1 #29.33); Sat, 28 Oct 95 14:20 GMT
Message-Id: <m0t9C7h-0002bkC@chiark.chu.cam.ac.uk>
Date: Sat, 28 Oct 95 14:20 GMT
From: Ian Jackson <ian@chiark.chu.cam.ac.uk>
To: Debian bugs mailserver <debian-bugs-request@pixar.com>
Subject: package-less bugs

reassign 1732 perl
reassign 1681 cron
reassign 1756 at
reassign 1736 at
reassign 1767 cern-httpd
reassign 1733 ncftp

Ian Jackson / iwj10@thor.cam.ac.uk, with the debian-bugs tracking mechanism
This page last modified 07:43:01 GMT Wed 01 Nov