From: Thomas Fischbacher <Thomas.Fischbacher@Physik.Uni-Muenchen.DE>
To: caml-list@inria.fr
Subject: [Caml-list] Problem with the old Num implementation of ocaml (fwd)
Date: Fri, 19 Dec 2003 11:17:11 +0100 (CET) [thread overview]
Message-ID: <Pine.LNX.4.58.0312191113120.11483@seekar.cip.physik.uni-muenchen.de> (raw)
[-- Attachment #1: Type: TEXT/PLAIN, Size: 4863 bytes --]
The following pieces of email I just submitted to the Debian Bug Tracking
System; Sven Luther (the Debian Maintainer) recommended to also forward it
to this list, as this may be of interest to more people...
---------- Forwarded message ----------
Date: Thu, 18 Dec 2003 21:15:40 +0100 (CET)
From: Thomas Fischbacher <tf@cip.physik.uni-muenchen.de>
To: submit@bugs.debian.org
Subject: Problem with the old Num implementation of ocaml
Package: ocaml
Version: 3.06-21
Severity: grave
Please note that this bug concerns the "old" Num implementation that was
removed in a recent update. I nevertheless use(d) it as I am right
now doing research for a new string theory paper and wanted to
consistently use one and the same somewhat environment throughout the
process. Nevertheless, I suppose this affects all versions having the old num
implementation (next thing I'll do is to upgrade my entire system to the
new implementation and check the behaviour of that one for some large test
calculations).
The attachment will reproduce a condition where doing the same calculation
(which is purely functional to the outside and does not use global state
or side effects, but involves Num) many times in sequence will give
different results.
As you see, about half of this file is data; I did not manage to find a
smaller test case creating that condition. Although I consider this highly
unlikely, this piece of code may involve an "int"-type related integer
overflow. (Nevertheless, even so, subsequent identical calculations should
not give different results...)
On my system(*), the output of a num_ocaml interpreter built as described
in the Num section of the documentation, but also including the Unix
module is:
0 ==> -12747938802280433395210374808335212773156996019062242486412495785350259890027861091589626807758181401556588623046875/764762496031801254357991532266868085634832685275244705613839817948600630474284529321916381431208558769420593384116260078281979735715302794541235545562947747053568
1 ==> -24799801902139948285742077521010897923261300584495629346339410063333039539280530883995185222932342824043982837509521484375/4156317913216311164989084414493848291493655898235025573988259880155438209099372441966936855604394341138155398826718804773271628998452732579028454051972542103552
2 ==> -39148920061803210956691061036397438426365134774540146675772774556810648122275561412271743926625375084180283661376953125/2294287488095403763073974596800604256904498055825734116841519453845801891422853587965749144293625676308261780152348780234845939207145908383623706636688843241160704
3 ==> -39148920061803210956691061036397438426365134774540146675772774556810648122275561412271743926625375084180283661376953125/2294287488095403763073974596800604256904498055825734116841519453845801891422853587965749144293625676308261780152348780234845939207145908383623706636688843241160704
4 ==> -24799801902139948285742077521010897923261300584495629346339410063333039539280530883995185222932342824043982837509521484375/4156317913216311164989084414493848291493655898235025573988259880155438209099372441966936855604394341138155398826718804773271628998452732579028454051972542103552
5 ==> -24799801902139948285742077521010897923261300584495629346339410063333039539280530883995185222932342824043982837509521484375/4156317913216311164989084414493848291493655898235025573988259880155438209099372441966936855604394341138155398826718804773271628998452732579028454051972542103552
6 ==> -39148920061803210956691061036397438426365134774540146675772774556810648122275561412271743926625375084180283661376953125/2294287488095403763073974596800604256904498055825734116841519453845801891422853587965749144293625676308261780152348780234845939207145908383623706636688843241160704
7 ==> -39148920061803210956691061036397438426365134774540146675772774556810648122275561412271743926625375084180283661376953125/2294287488095403763073974596800604256904498055825734116841519453845801891422853587965749144293625676308261780152348780234845939207145908383623706636688843241160704
8 ==> -39148920061803210956691061036397438426365134774540146675772774556810648122275561412271743926625375084180283661376953125/2294287488095403763073974596800604256904498055825734116841519453845801891422853587965749144293625676308261780152348780234845939207145908383623706636688843241160704
9 ==> 0
- : unit = ()
The correct result is zero.
(*) uname -a
Linux djinn 2.4.23 #6 Thu Dec 4 18:13:28 CET 2003 i686 GNU/Linux
I would like to know whether this can be confirmed.
--
regards, tf@cip.physik.uni-muenchen.de (o_
Dr. Thomas Fischbacher - http://www.cip.physik.uni-muenchen.de/~tf //\
(lambda (n) ((lambda (p q r) (p p q r)) (lambda (g x y) V_/_
(if (= x 0) y (g g (- x 1) (* x y)))) n 1)) (Debian GNU)
===================
next reply other threads:[~2003-12-19 10:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-12-19 10:17 Thomas Fischbacher [this message]
2003-12-27 22:55 ` [Caml-list] Problem with the old Num implementation of ocaml (fwd) (PR#1989) Damien Doligez
2003-12-30 11:25 ` [Caml-list] Problem with the Num implementation Christophe Raffalli
2004-01-06 9:46 ` [Caml-list] Problem with the old Num implementation of ocaml (fwd) (PR#1989) Thomas Fischbacher
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.58.0312191113120.11483@seekar.cip.physik.uni-muenchen.de \
--to=thomas.fischbacher@physik.uni-muenchen.de \
--cc=caml-list@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox