mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-10-17 09:06:18 +02:00
* another fix for precision
This commit is contained in:
parent
8830a9fb4a
commit
dd3688a927
@ -41,14 +41,13 @@ const
|
|||||||
|
|
||||||
var correct : longint; { Power correction }
|
var correct : longint; { Power correction }
|
||||||
currprec : longint;
|
currprec : longint;
|
||||||
il,roundcorr : Valreal;
|
il,il2,roundcorr : Valreal;
|
||||||
temp : string;
|
temp : string;
|
||||||
power : string[10];
|
power : string[10];
|
||||||
sign : boolean;
|
sign : boolean;
|
||||||
i : integer;
|
i : integer;
|
||||||
dot : byte;
|
dot : byte;
|
||||||
currp : pchar;
|
currp : pchar;
|
||||||
{ il : longint; caused overflows !! PM }
|
|
||||||
begin
|
begin
|
||||||
case real_type of
|
case real_type of
|
||||||
rt_s32real :
|
rt_s32real :
|
||||||
@ -122,12 +121,13 @@ begin
|
|||||||
correct:=0;
|
correct:=0;
|
||||||
if d>=i10 then
|
if d>=i10 then
|
||||||
begin
|
begin
|
||||||
il:=10;
|
il:=i1;
|
||||||
while (d>il) do
|
il2:=i10;
|
||||||
begin
|
repeat
|
||||||
il:=il*10;
|
il:=il2;
|
||||||
inc(correct);
|
il2:=il*i10;
|
||||||
end;
|
inc(correct);
|
||||||
|
until (d<il2);
|
||||||
d:=d/il;
|
d:=d/il;
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
@ -234,7 +234,10 @@ end;
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.16 1999-11-03 00:55:09 pierre
|
Revision 1.17 1999-11-03 09:54:24 peter
|
||||||
|
* another fix for precision
|
||||||
|
|
||||||
|
Revision 1.16 1999/11/03 00:55:09 pierre
|
||||||
* problem of last commit for large d values corrected
|
* problem of last commit for large d values corrected
|
||||||
|
|
||||||
Revision 1.15 1999/11/02 15:05:53 peter
|
Revision 1.15 1999/11/02 15:05:53 peter
|
||||||
|
Loading…
Reference in New Issue
Block a user