- Multiplication is iterated addition.
(= (* 5 4) (reduce + (take 4 (repeat 5))))
- Exponentiation is iterated multiplication.
(= (expt 5 4) (reduce * (take 4 (repeat 5)))) ; if you've imported clojure.contrib.math/expt
- So what do you get if you iterate exponentiation? Is it useful?
(= (+ (log a) (log b)) (log (* a b)))and the definition of log as the inverse of exponentiation, just as division and subtraction invert multiplication and addition. What, then, is the law for
(expt (log a) (log b))? Again, this should be the log of our mystery operation on a and b.
It turns out Wikipedia has me covered. A tiny little section on the Exponentiation page links off to tetration, Ackermann function, and Knuth's up-arrow notation. There goes my night.
(Bonus: I finally have all the background to understand the third panel of xkcd 207. #latetotheparty)
Post a Comment