@@ -1559,6 +1559,9 @@ type
j : sizeint;
begin
+ { This seemingly useless condition ensures that sin(-0.0)=-0.0 }
+ if (d=0.0) then
+ exit(d);
j := rem_pio2(d,z) and 3;
zz := z * z;
@@ -948,7 +948,11 @@ function lnxp1(x : float) : float;
if (y=1.0) then
lnxp1:=x
else
- lnxp1:=ln(y)+(x-(y-1.0))/y;
+ begin
+ lnxp1:=ln(y); { lnxp1(-1) = ln(0) = -Inf }
+ if y>0.0 then
+ lnxp1:=lnxp1+(x-(y-1.0))/y;
+ end;
end;