rewritten to use `RoundingMode`.  i'd forgotten about that.  code is smaller too, and tests now cover all the methods.