Exact rational multiples of pi (and integer powers of pi)


Version on this page:
LTS Haskell 22.29:
Stackage Nightly 2024-07-13:
Latest on Hackage:

See all snapshots exact-pi appears in

MIT licensed by Douglas McClean
Maintained by [email protected]
This version can be pinned in stack with:exact-pi-,2118

Module documentation for

Depends on 2 packages(full list with versions):
Used by 2 packages in lts-18.28(full list with versions):


Exact rational multiples of pi (and integer powers of pi) in Haskell

Build Status Hackage Version Stackage version


  • Bump base dependency.
  • Resolve compiler warnings.

  • Change implementation of ‘rationalApproximations’ to use Chudnovsky’s approximations.

  • Comply with NoStarIsType pragma.

  • Add Semigroup ExactPi instance.

  • Bump base dependency.

  • Fixed infinite loop in definition of negate.

  • Added function for computing rational approximations of ExactPi values.

  • Added simpler constraints for converting ExactPi types to terms with the minimal context.

  • Added support for exactly comparing values.

  • Added a type-level representation of ExactPi values.

  • Fixed a bug in recip.
  • Fixed approximation of exact values with a negative exponent for pi.

  • Fixed a missing case in isZero.

  • Added support for converting to exact integers or exact rationals.

  • Removed dependency on groups package, since it appears not to be widely used.
  • Fixed a missing case alternative in recip.

  • Added support for GHC 7.8.