add functions in BasicMath.h