post-scarcity/lisp/expt.lisp
Simon Brooke d9d789fdd0 Now creating the correct internal bignum representation
add_integers returns an integer which by inspection of the internal representation is correct, but the print representation is not correct.
2019-01-03 11:21:08 +00:00

9 lines
203 B
Common Lisp

(set! expt (lambda
(n x)
"Return the value of `n` raised to the `x`th power."
(cond
((= x 1) n)
(t (* n (expt n (- x 1)))))))
(expt 2 65)