[M3devel] LONGINT problem?
Rodney M. Bates
rodney_bates at lcwb.coop
Fri Jul 15 20:31:29 CEST 2011
On 07/15/2011 06:22 AM, Olaf Wagner wrote:
> Quoting Ken Durocher <kcdurocher at gmail.com>:
> [...]
>> This outputs:
>>
>> 100: 17 Triples, 7 Primitives
>> 1000: 325 Triples, 70 Primitives
>> 10000: 0858 Triples, 703 Primitives
>> 100000: 40701 Triples, 7024 Primitives
>> 1000000: 808950 Triples, 70229 Primitives
>>
>> However, if I just use INTEGER on a 64 bit machine, I get the proper output:
>>
>> 100: 17 Triples, 7 Primitives
>> 1000: 325 Triples, 70 Primitives
>> 10000: 4858 Triples, 703 Primitives
>> 100000: 64741 Triples, 7026 Primitives
>> 1000000: 808950 Triples, 70229 Primitives
>>
>> Note how 10000 and 100000 are different. The code is literally exactly the
>> same, only with LONGINT replaced by INTEGER.
>
> As only some of the outputs are wrong, I'd guess that one of the
> output formatting procedures still has a problem with LONGINT.
It's definitely in formatting. See this debug log:
(m3gdb) p Fmt.LongInt(4858,10)
$6 = (*16_0000000000a212d8*) "0858"
(m3gdb) p Fmt.Int(4858,10)
$7 = (*16_0000000000a21300*) "4858"
(m3gdb) p Fmt.LongInt(64741,10)
$8 = (*16_0000000000a21328*) "40701"
(m3gdb) p Fmt.Int(64741,10)
$9 = (*16_0000000000a21350*) "64741"
(m3gdb) p Fmt.LongInt(7026,10)
$10 = (*16_0000000000a21378*) "7024"
(m3gdb) p Fmt.Int(7026,10)
$11 = (*16_0000000000a213a0*) "7026"
(m3gdb) p Fmt.LongInt(325,10)
$12 = (*16_0000000000a213c8*) "325"
(m3gdb) p Fmt.Int(325,10)
$13 = (*16_0000000000a213f0*) "325"
>
> We need to fix that.
>
> Olaf
More information about the M3devel
mailing list