The variable-precision package

[ Tags: bsd3, library, math ] [ Propose Tags ]

Software floating point with type-tagged variable mantissa precision, implemented using a strict pair of Integer and Int scaled alike to decodeFloat. Version 0.2.1 added a fixed point number type.

Instances of the usual numeric type classes are provided, along with additional operators (with carefully chosen fixities) to coerce, adjust and reify precisions.

The intention with this library is to be relatively simple but still useful, refer to the documentation for caveats concerning accuracy and assorted ill-behaviour.

Usage with ghc(i)-7.0.4 might require -fcontext-stack=100.

[Skip to Readme]


Versions 0.1, 0.1.1, 0.2, 0.2.1, 0.3.1, 0.4
Change log CHANGES
Dependencies base (>=3 && <6), floatshow (==0.2.*), integer-gmp (>=0.4), type-level-natural-number (==1.*) [details]
License BSD3
Copyright (c) 2012 Claude Heiland-Allen
Author Claude Heiland-Allen
Category Math
Home page
Source repo head: git clone git://
this: git clone git:// v0.2.1)
Uploaded Sun May 20 05:25:17 UTC 2012 by ClaudeHeilandAllen
Distributions NixOS:0.4
Downloads 1923 total (35 in the last 30 days)
Rating (no votes yet) [estimated by rule of succession]
Your Rating
  • λ
  • λ
  • λ
Status Docs uploaded by user
Build status unknown [no reports yet]
Hackage Matrix CI





Enable optimisations requiring recent integer-gmp


Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info


Maintainer's Corner

For package maintainers and hackage trustees

Readme for variable-precision-0.2.1

[back to package description]
Users of ghc-7.0.4 might require -fcontext-stack=100
This flag can also be :set within ghci.