User:Eriksiers/Alternate CLISP exponentiation: Difference between revisions
Content added Content deleted
No edit summary |
m (added footnote to Ahungry's example) |
||
Line 7: | Line 7: | ||
(setf r (* r a))))) |
(setf r (* r a))))) |
||
</lang> |
</lang> |
||
<small>(The above example is by [[User:Ahungry|Ahungry]].)</small> |
|||
I wrote this while reading the first few chapters of [http://www.gigamonkeys.com/book/ Practical Common Lisp]. (I'm about halfway through chapter 4 right now.) It ''seems'' to work -- at least for me, using [[CLISP]] -- and I ''think'' it might be a better version than the "real" solution provided at [[Exponentiation operator#Common Lisp]], but I'm still way too green to know for sure. (This version can handle negative values of '''b''', whereas that version can't -- I think.) |
I wrote this while reading the first few chapters of [http://www.gigamonkeys.com/book/ Practical Common Lisp]. (I'm about halfway through chapter 4 right now.) It ''seems'' to work -- at least for me, using [[CLISP]] -- and I ''think'' it might be a better version than the "real" solution provided at [[Exponentiation operator#Common Lisp]], but I'm still way too green to know for sure. (This version can handle negative values of '''b''', whereas that version can't -- I think.) |
||