]> mj.ucw.cz Git - libucw.git/commit
Tried to use libm for calculating logarithmic frequencies of words,
authorMartin Mares <mj@ucw.cz>
Wed, 5 Feb 2003 18:15:24 +0000 (18:15 +0000)
committerMartin Mares <mj@ucw.cz>
Wed, 5 Feb 2003 18:15:24 +0000 (18:15 +0000)
commitfa8903dc5bda17a564aa3348780a20e6df04fa11
tree0fa6aaefdcd1710c08d4ab2bfd218dacf6a8aaaf
parent9941a9986e5c2c60e5fe6354e8a936b8b725a780
Tried to use libm for calculating logarithmic frequencies of words,
but ran into problems with function name collisions. Damn the C's flat
namespace!

Renamed our log to log_msg, but keep the original name as a macro
expanding to the new one. Also renamed log2 (which is currently not used
anywhere) to fls (find last set, akin to ffs).

Introduced lib/math.h which is a wrapper around <math.h> handling
name collisions by clever macro tricks.
lib/lib.h
lib/log.c
lib/log2.c
lib/math.h [new file with mode: 0644]