tw8678.pp 460 B

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