Move rounding routine to before negative check

without this block, tests show accuracy to 1.3e-8, so this
round off level is acceptable.