Description
Correctly-rounded arbitrary-precision floating-point arithmetic.
Description
This package provides numeric instances for MPFR that use "Implicit Configurations" from http://www.cs.rutgers.edu/~ccshan/prepose/prepose.pdf to choose a Rounding
and Precision
. For those that do not want to use reflection, explicit instances are provided for common precisions and for the built-in rounding modes.
This package should work correctly with GHC 8.4.4 or later.
>>>
import Numeric.Rounded
>>>
:set -XDataKinds
>>>
exp pi :: Rounded TowardZero 512
23.140692632779269005729086367948547380266106242600211993445046409524342350690452783516971997067549219675952704801087773144428044414693835844717445879609842
rounded version 1.x is for MPFR version 4.0 and above.