Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Tom Rettigs Library - lognbasx(<n number>, <n base>) http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 LOGNBASX(<N number>, <N base>)
 Gives access to logarithms other than the natural logarithm.
 Returns <expN> logarithm of <number> to the base <base>.

 <number> is the number whose logarithm is being computed
 <base> is the base of logarithm.

 Returns the power to which <base> must be raised
 in order to produce <number>.

 * Calculate how many seeks into a 1000-element
 * table will be necessary to locate a given
 * value using a binary search.

 * Formula is INT( log(1000) to base 2) + 1

 m_numseek = INT(LOGNBASX( 1000, 2 )) + 1

 * m_numseek contains 10


             Placed in the Public Domain by Tom Rettig Assoc.

See Also: LOGTEN()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson