softmath: Add log2
softmath: Add ilogb
softmath: Add log1p
softmath: Use constant for log(2)