mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-10 21:49:14 +02:00
Add explicit -CE option and check that mysqrt returns zero for negative arg
This commit is contained in:
parent
564d50ce8e
commit
3a481d9590
@ -1,4 +1,5 @@
|
||||
{ %skiptarget=go32v2 }
|
||||
{ %opt=-CE }
|
||||
|
||||
{$ifdef fpc}{$mode objfpc}{$endif}
|
||||
program test_fpu_excpetions;
|
||||
@ -28,4 +29,9 @@ begin
|
||||
Writeln(' = 0 if x < 0');
|
||||
Writeln(' 6.5+5.76*mysqrt(3.1) = ',x+y*mysqrt(z):0:6);
|
||||
Writeln(' 6.5+5.76*mysqrt(-3.1) = ',x+y*mysqrt(-z):0:6);
|
||||
if (x+y*mysqrt(-z)<>x) then
|
||||
begin
|
||||
writeln('Error: mysqrt does not return zero for negative argument');
|
||||
halt(1);
|
||||
end;
|
||||
end.
|
||||
|
Loading…
Reference in New Issue
Block a user