mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-31 13:10:31 +02:00
* improved fpc_frac_real
This commit is contained in:
parent
3f14a19d3e
commit
04145589a9
@ -1758,11 +1758,9 @@ end;
|
|||||||
|
|
||||||
{$ifndef FPC_SYSTEM_HAS_FRAC}
|
{$ifndef FPC_SYSTEM_HAS_FRAC}
|
||||||
function fpc_frac_real(d : ValReal) : ValReal;compilerproc;
|
function fpc_frac_real(d : ValReal) : ValReal;compilerproc;
|
||||||
var
|
|
||||||
i: integer;
|
|
||||||
begin
|
begin
|
||||||
i := (float64high(d) and $7ff00000) shr 20;
|
{ Nan or +/-Inf }
|
||||||
if i=$7FF then
|
if (float64high(d) and $7ff00000)=$7ff00000 then
|
||||||
{ return NaN }
|
{ return NaN }
|
||||||
result := (d-d)/0.0
|
result := (d-d)/0.0
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user