t_id
39
t_version
1.1
t_adddate
2003/10/03
t_result
0
t_knownrunerror
0
tr_id | run | tr_ok | tr_skip | tr_result |
---|---|---|---|---|
1022760074 | 1027388 | True | False | Successfully run |
Record count: 1
{ %version=1.1 } {$ifdef fpc}{$mode objfpc}{$endif} program test_fpu_excpetions; uses SysUtils; function mysqrt(x : real) : real; begin try mysqrt:=sqrt(x); except on e : exception do mysqrt:=0; end; end; var x, y,z : real; begin x:=6.5; y:=5.76; z:=3.1; Writeln('Testing mysqrt (x) = sqrt(x) if x >= 0'); 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); end.