test and fix libs/math.h