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 pages reveals an arguably > > more readable style: > > > > ./share/man/man3/queue.3:overhead at the expense of O(n) removal for > > arbitrary elements. > > ./share/man/man3/tree.3:and n inserts on an initially empty tree as O((m + > > n)lg n). > > ./share/man/man3/tree.3:The amortized cost for a sequence of m accesses to > > a splay tree is O(lg n). > > ./share/man/man3/tree.3:Every operation on a red-black tree is bounded as > > O(lg n). > > ./share/man/man5/pf.conf.5:If there are 50 rules, all of them are evaluated > > sequentially in O(n). > > ./share/man/man5/pf.conf.5:searches in O(log2 n). > > > > > > 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 that's the argument to be made, it should be log2 as in pf.conf.
oops. (my compsci classes were in another millenium) -f -- if practice makes perfect, and nobody's perfect, why practice?
