math: extensive log*.c cleanup