Rounding rationals to significant digits and decimal places.
The ‘round’ function from the prelude returns an integer. The standard librarys of C and C++ have round functions that return floating point numbers. Rounding in this library takes and returns ‘Rational’s and can round to a number of significant digits or a number of decimal places.
Initial version with;
dpRoundfor rounding rational numbers to decimal places.
sdRoundfor rounding rational numbers to significant digits.