qsort.3 big O notation

2015-03-03 Thread frantisek holop
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 style: ./share/man/man3/queue.3:o

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

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 s

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 compl

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 t

Re: qsort.3 big O notation

2015-03-03 Thread Tobias Stöckmann
> On March 3, 2015 at 5:48 PM frantisek holop 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 constants a

Re: qsort.3 big O notation

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

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 gener

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 wro