mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-16 05:59:28 +02:00
* rem_pio2: Return NaN for infinite or NaN arguments, so it is propagated into return values of sin(),cos() and other (not yet existing) callers.
git-svn-id: trunk@27625 -
This commit is contained in:
parent
01d63b376e
commit
65f75791ea
@ -951,6 +951,12 @@ type
|
||||
end;
|
||||
z := abs(x);
|
||||
e0 := (float64high(z) shr 20)-1046;
|
||||
if (e0 = ($7ff-1046)) then { z is Inf or NaN }
|
||||
begin
|
||||
z := x - x;
|
||||
result:=0;
|
||||
exit;
|
||||
end;
|
||||
float64sethigh(z,float64high(z) - (e0 shl 20));
|
||||
tx[0] := trunc(z);
|
||||
z := (z-tx[0])*two24;
|
||||
|
Loading…
Reference in New Issue
Block a user