gm2
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gm2] BUG: WriteLongReal failure, shows zero when number is less tha


From: Gaius Mulley
Subject: Re: [Gm2] BUG: WriteLongReal failure, shows zero when number is less than 0.1
Date: 01 Dec 2008 07:57:12 +0000
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4

"Néstor" <address@hidden> writes:

> Here is the patch!
> 
> I have been able to debug the error, and changing the following line works:
> 
> --- StringConvert.mod 2008-03-19 11:22:14.000000000 +0100
> +++ StringConvert.mod 2008-11-30 14:55:53.000000000 +0100
> @@ -746,7 +746,7 @@
>           (* add leading zero's *)
>           IF Length(s)<LogPower
>           THEN
> -            s := Mult(InitString('0'), LogPower-Length(s)) ;
> +            s := ConCat(Mult(InitString('0'), LogPower-Length(s)), Mark(s)) ;
>           END ;
>           Result := ConCat(Result, Mark(s))
>        END
> 
> The only thing now is that some numbers get a value which had to be
> rounded. For example:
> 
> WriteLongReal(0.001, 8):
> ==> 0.000999
> 
> I'm going to analyze this behaviour.
> 
> 2008/11/29 Michael Lambert <address@hidden>:
> > Confirmed on Mac/Intel and Debian/Alpha.
> >

Hi Néstor,

many thanks - applied patch to cvs,

regards,
Gaius




reply via email to

[Prev in Thread] Current Thread [Next in Thread]