[REBOL] Re: optimising recursion?
From: g:santilli:tiscalinet:it at: 21-Mar-2002 22:50
Hi Petr,
On Wednesday, March 20, 2002, 11:15:24 AM, you wrote:
->>> ble: dir-size? %/g/control/
PK> ** Math Error: Math or number overflow
PK> ** Where: dir-size?
PK> ** Near: total: total + tmp
The problem is:
>> a: to-integer 2 ** 31 - 1
== 2147483647
>> a + 1
** Math Error: Math or number overflow
** Where: halt-view
** Near: a + 1
but if you use a decimal! instead of integer! you can grow
further.
Try changing:
total: 0
to:
total: to-decimal 0
HTH,
Gabriele.
--
Gabriele Santilli <[g--santilli--tiscalinet--it]> -- REBOL Programmer
Amigan -- AGI L'Aquila -- REB: http://web.tiscali.it/rebol/index.r