[Top][All Lists]
[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: |
Néstor |
Subject: |
Re: [Gm2] BUG: WriteLongReal failure, shows zero when number is less than 0.1 |
Date: |
Sun, 30 Nov 2008 14:59:41 +0100 |
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.
>
> Michael
>
> On 29 Nov 2008, at 11:25, Néstor wrote:
>
>> Hi.
>>
>> WriteReal shows zero when a number is less that 0.1.
>>
>> You have an example attached, you can see the same number, when
>> multiplied by 100000, it's Ok.
>>
>> Thanks!
>>
>> --
>> Néstor
>> +34 687 96 74 81
>> address@hidden
>> <numeroe.mod>_______________________________________________
>> gm2 mailing list
>> address@hidden
>> http://lists.nongnu.org/mailman/listinfo/gm2
>
>
>
> _______________________________________________
> gm2 mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/gm2
>
--
Néstor
+34 687 96 74 81
address@hidden