Bug report
Krzysztof Gozdziewski
chris at astri.uni.torun.pl
Sat Nov 15 02:32:50 CET 1997
Hello!
I have found a strange behaviour of the gpc compiler,
when reading real numbers, having the form
x.xxe+00
They are converted to 0.
The sample session follows.
Thanks.
Krzysztof Gozdziewski
/home/chris/Gravity>uname -a
Linux ecia 2.0.30 #2 Sat Sep 27 15:42:44 MET DST 1997 i486
/home/chris/Gravity>gpc --version
2.0(2.7.2.1)
/home/chris/Gravity>more test.p
program testbug;
var
a : real;
begin
writeln('Enter 1.0e+00 to reproduce the error');
readln( a );
writeln( 'a = ', a );
end.
/home/chris/Gravity>gpc test.p
/home/chris/Gravity>a.out
Enter 1.0e+00 to reproduce the error
1.0e+00
a = 2.1883084e-314
/home/chris/Gravity>a.out
Enter 1.0e+00 to reproduce the error
2
a = 2.0000000e+00
--
^-^ ~ Krzysztof Gozdziewski
(o o) ~ Torun Centre for Astronomy
=*= ~ Gagarina 11, PL-87-100 Torun, POLAND
(m_m) ~ http://www.astri.uni.torun.pl/~chris
More information about the Gpc
mailing list