In the most recent algorithms lecture I heard we used log for base 2, ln for 
base e, and lg for base 10. But asymptotically the base doesn't matter and the 
notation coventions differ. So I'd also go for consistency with other 
documentation. 

On March 3, 2015 5:48:20 PM CET, frantisek holop <min...@obiit.org> wrote:
>Joerg Sonnenberger, 03 Mar 2015 17:28:
>> On Tue, Mar 03, 2015 at 05:02:39PM +0100, frantisek holop wrote:
>> > i leave the battle about lg vs log to others,
>> > but i prefer 'log' as there is a man page for that
>> > and there is none for 'lg'...
>> 
>> If anything, it should be "log" because that is the name of the
>> mathematical function. libm is completely irrelevant in this context.
>
>'lg' is also a valid name
>(altough i admit i didn't know, i was used to log2)
>https://en.wikipedia.org/wiki/Logarithm#Particular_bases
>
>as Tedu pointed out lg = log2 and lg != log
>
>but i think my point is still kind of valid,
>as there is log2(3) and no lg(3).
>
>i find it relevant that libm should also use
>the most common, easiest names where possible...
>it is kind of nice to be able to do 'man log2'
>after reading 'man qsort', a kind of indirect
>cross reference.
>
>-f
>-- 
>illiterate?  write for a free brochure!

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.

Reply via email to