modified ips_pretest.cpp to include math.h