MPL-2.0 licensed by Phil de Joux
Maintained by [email protected]
This version can be pinned in stack with:siggy-chardust-1.0.0@sha256:6b8ce9ea6b344650e47f68d194835091c8bafe90ea88c37abcb8409365a876d2,2657

Module documentation for 1.0.0

  • Data
    • Data.Ratio
      • Data.Ratio.Rounding
Depends on 1 package(full list with versions):
Used by 1 package in lts-12.21(full list with versions):

siggy-chardust

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.

Changes

1.0.0

Initial version with;

  • dpRound for rounding rational numbers to decimal places.
  • sdRound for rounding rational numbers to significant digits.