Arc Forumnew | comments | leaders | submitlogin
2 points by jsgrahamus 4595 days ago | link | parent

I received no error messages.

I did try factorial and got some strange answers:

  (def fact (n) (if (< n 2) 1 (* n (fact (- n 1)))))
 
  => (object function {sig, body, })
  (fact 5)
 
  => 120
  (fact 1000)

  => 0
  (fact 10)

  => 3628800
  (fact 21)

  => -4249290049419214848
This is was run on Scientific Linux 6.2 in Virtual Box on Windows 7 Home Premium (64-bit)


1 point by akkartik 4595 days ago | link

Thanks a lot! Yes, wart doesn't support bignums yet. Its arithmetic is that of the underlying C, which on a 64-bit machine can handle factorial of 20, but not 21.

  fact.20

  => 2432902008176640000

-----