math: fix __rem_pio2 in non-nearest rounding modes