Re: qsort.3 big O notation

2015-03-03 Thread Ted Unangst
frantisek holop wrote: i was looking at the qsort(3) man page, and saw O N lg N, etc. first i thought, maybe there should be some fancy utf8 math parentheses around, but looking at the source, no, it's plain ascii. a quick search in other man pages reveals an arguably more readable

Re: qsort.3 big O notation

2015-03-03 Thread Joerg Sonnenberger
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

Re: qsort.3 big O notation

2015-03-03 Thread frantisek holop
Ted Unangst, 03 Mar 2015 11:13: frantisek holop wrote: i was looking at the qsort(3) man page, and saw O N lg N, etc. first i thought, maybe there should be some fancy utf8 math parentheses around, but looking at the source, no, it's plain ascii. a quick search in other man

Re: qsort.3 big O notation

2015-03-03 Thread frantisek holop
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

Re: qsort.3 big O notation

2015-03-03 Thread Tobias Stöckmann
On March 3, 2015 at 5:48 PM frantisek holop min...@obiit.org wrote: 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 When talking about big O notation, you want to trim as many

Re: qsort.3 big O notation

2015-03-03 Thread Liviu Daia
On 3 March 2015, 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

Re: qsort.3 big O notation

2015-03-03 Thread Thomas Schmidt
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

Re: qsort.3 big O notation

2015-03-03 Thread frantisek holop
Liviu Daia, 03 Mar 2015 19:26: '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 Actually, that isn't what Tedu said, and it isn't the generally