using test_approx_eq to eliminate rounding errors