Switching to Integer doesn't help unless you have a bigint lib, at
least on my box:
The first 15 factorials are:
1
2
6
24
120
720
5040
40320
362880
3628800
39916800
479001600
no bigint lib loaded
current instr.: '(null)' pc 16 ((unknown file):-1)
To address the other point, I'll reorganize the examples in the next
few days to reduce the size of the PASM and split up the PIR into
multiple pages.
On Sep 9, 2005, at 8:52 AM, Leopold Toetsch wrote:
Bernhard Schmalhofer via RT <[EMAIL PROTECTED]> wrote:
[EMAIL PROTECTED] - Di 19. Okt 2004, 19:49:44]:
Is it the intended operation of the 'factorial' program on the
Parrot
examples page to
truncate the results? Looks like a bug to me...
I have checked the factorial example on
http://www.parrotcode.org/examples/pasm.html.
Starting with 13! incorrect results are indeed returned on my 32bit
Linux machine.
Should there a promotion to BigInt be taking place? on an overflow
indication?
Most of the examples are really old and partially outdated. I think
there
should be very few PASM examples, more complex examples should be in
PIR. Regarding the factorial: using .Integer PMCs would fix it.
leo