initial cmath code and minor libm.h update