[PLUG] OT: Formula For Determining # Of Digits In An Integer
glen e. p. ropella
gepr at acm.org
Fri Feb 18 01:38:19 UTC 2005
=><=><= "jvc" == Jason Van Cleve <jason at vancleve.com> writes:
jvc> In any case, I wanted to know the formula (and I got it in spades, thank
jvc> you!). I'll probably time it much later on, when I'm ready to optimize.
Yeah, but you didn't get it in this format, yet... Russell? Where are
you, man? [grin]
(defun numdig (n) (if (< n 10) 1 (+ 1 (numdig (/ n 10)))))
--
glen e. p. ropella =><= Hail Eris!
H: 503.630.4505 http://www.ropella.net/~gepr
M: 971.219.3846 http://www.tempusdictum.com
More information about the PLUG
mailing list