rounding error friendly version of CMA