make rounding modes parametric types
Merge pull request #8794 from simonbyrne/rounding-parametric

make rounding modes parametric types