From dd3688a92711d80cee1f05a85d78f9719fa2be34 Mon Sep 17 00:00:00 2001 From: peter Date: Wed, 3 Nov 1999 09:54:24 +0000 Subject: [PATCH] * another fix for precision --- rtl/inc/real2str.inc | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/rtl/inc/real2str.inc b/rtl/inc/real2str.inc index 54278a5382..943683d8c5 100644 --- a/rtl/inc/real2str.inc +++ b/rtl/inc/real2str.inc @@ -41,14 +41,13 @@ const var correct : longint; { Power correction } currprec : longint; - il,roundcorr : Valreal; + il,il2,roundcorr : Valreal; temp : string; power : string[10]; sign : boolean; i : integer; dot : byte; currp : pchar; - { il : longint; caused overflows !! PM } begin case real_type of rt_s32real : @@ -122,12 +121,13 @@ begin correct:=0; if d>=i10 then begin - il:=10; - while (d>il) do - begin - il:=il*10; - inc(correct); - end; + il:=i1; + il2:=i10; + repeat + il:=il2; + il2:=il*i10; + inc(correct); + until (d