Article View: comp.sys.mac
Article #42927Bug in LSP arithmetic
From: Rick Zaccone
Date: Tue, 23 May 1989 01:19
Date: Tue, 23 May 1989 01:19
23 lines
1019 bytes
1019 bytes
The following program produces incorrect results in LSP 2.01:
program test (input, output);
var
a, out: real;
begin
a := 16807.0;
out := a * a;
writeln(out : 10 : 0);
end.
The program prints 282475264 instead of the correct 282475249. If I
type "a*a" in the observe window, I can see that a*a is being computed
correctly. The error occurs when the assignment is made to out. Can
anyone else reproduce this? Am I missing something obvious?
I am running on a Mac Plus with Finder 6.1, and System 6.0.2.
Rick Zaccone
--
zaccone@bknlvms.bitnet
zaccone@rigel.bucknell.edu
Technical Details
Message-ID:
<113@rigel.bucknell.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!gatech!psuvax1!hydra!rigel!zacconeShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!gatech!psuvax1!hydra!rigel!zaccone From: zaccone@rigel.bucknell.edu (Rick Zaccone) Newsgroups: comp.sys.mac,comp.sys.mac.programmer Subject: Bug in LSP arithmetic Message-ID: <113@rigel.bucknell.edu> Date: 23 May 89 01:19:53 GMT Reply-To: zaccone@sol.bucknell.edu () Organization: Bucknell University, Lewisburg, Pa. Lines: 23