mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-14 01:39:25 +02:00

delta for which 1.0 and 1.0+delta is different, rather than some power-of-10 ballpark equivalent (fixes mantis #11308) * print the same number of digits for doubles on systems which support extended as on those which don't (i.e., one digit less on the former). This solves regressions after the previous change and is Delphi-compatible. * adapted tests for the previous change git-svn-id: trunk@11025 -
23 lines
428 B
ObjectPascal
23 lines
428 B
ObjectPascal
{ Source provided for Free Pascal Bug Report 2226 }
|
|
{ Submitted by "" on 2002-11-12 }
|
|
{ e-mail: }
|
|
Program compcrash;
|
|
|
|
const mindouble: double = -5.0E324;
|
|
|
|
var
|
|
s : string;
|
|
correct : string;
|
|
begin
|
|
case sizeof(extended) of
|
|
10: correct := ' -Inf';
|
|
8: correct := ' -Inf';
|
|
end;
|
|
str(mindouble,s);
|
|
if s<>correct then
|
|
begin
|
|
writeln('error');
|
|
halt(1);
|
|
end;
|
|
end.
|