blob: dae7b0ce33e405de006d56c7e95a3047ab3119d7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
{ %cpu=powerpc,powerpc64,sparc,arm,x86_64 }
var
l: longint;
s: single;
d: double;
begin
{$if not defined(cpux86_64) or defined(win64)} // or: using sse unit for math
l := maxlongint;
{$MINFPCONSTPREC default}
s:= l / 1.0;
d:= l / 1.0;
if (s <> d) then
halt(1);
{$MINFPCONSTPREC 32}
s:= l / 1.0;
d:= l / 1.0;
if (s <> d) then
halt(2);
{$MINFPCONSTPREC 64}
s:= l / 1.0;
d:= l / 1.0;
if (s = d) then
halt(3);
{$endif}
end.
|