tw37926.pp 439 B

123456789101112131415161718192021222324
  1. {$mode objfpc}
  2. uses
  3. sysutils,math;
  4. procedure test(const s: single);
  5. var
  6. tempcode: integer;
  7. sr: single;
  8. begin
  9. Val('8.077936E-28', sr, tempcode);
  10. if sr <> s then
  11. end;
  12. var s, sr: single;
  13. i, j, tempcode: Integer;
  14. begin
  15. for i := 1 to 5000 do begin
  16. s := 0;
  17. try
  18. for j := 0 to Random(5) do s := s + Random(2) * power(2, Random(256) - 127);
  19. except
  20. on e: EMathError do s := 0; //continue;
  21. end;
  22. end;
  23. end.