packages feed

qd-0.2: qd.cabal

Name:                 qd
Version:              0.2
Synopsis:             double-double and quad-double number type via libqd
Description:
                      This package supports both a double-double datatype (approx. 32 decimal digits)
                      and a quad-double datatype (approx. 64 decimal digits), using libqd (which is
                      implemented in C++ with C and Fortran wrappers).  To compile this package you
                      need libqd to be installed.
                      .
                      @'Numeric.QD.DoubleDouble.DoubleDouble'@ and @'Numeric.QD.QuadDouble.QuadDouble'@
                      are strict tuples of @CDouble@s, with the following instances:
                      .
                        * @'Eq'@
                      .
                        * @'Floating'@
                      .
                        * @'Fractional'@
                      .
                        * @'Num'@
                      .
                        * @'Ord'@
                      .
                        * @'Real'@
                      .
                        * @'RealFloat'@
                      .
                        * @'RealFrac'@
                      .
                        * @'Show'@
                      .
                        * @'Storable'@
                      .
                      But note that the following functions (while present) are @'undefined'@:
                      .
                        * @'properFraction'@
                      .
                        * @'truncate'@
                      .
                        * @'round'@
                      .
                        * @'decodeFloat'@
                      .
                        * @'encodeFloat'@
                      .
                        * @'exponent'@
                      .
                        * @'significand'@
                      .
                      Non-crashing implementations of these are planned in a future update to
                      this package, as well as instances of @Enum@ and @Read@.
                      .
                      Additional note: libqd depends on 64bit doubles, while some FPU architectures
                      use 80bit.  It is highly recommended to compile with -fno-excess-precision and
                      set the FPU control words to avoid erroneous behaviour, perhaps by doing
                      something like this at the start of your program:
                      .
                      > import Foreign (nullPtr)
                      > import GHC.Conc (forkOnIO, numCapabilities)
                      > import Numeric.QD.FPU.Raw (fpu_fix_start)
                      > main :: IO ()
                      > main = do
                      >   mapM_ (flip forkOnIO $ fpu_fix_start nullPtr) [ 0 .. numCapabilities - 1 ]
                      >   -- ...

License:              BSD3
License-file:         LICENSE
Author:               Claude Heiland-Allen
Maintainer:           claudiusmaximus@goto10.org
Category:             Math
Build-type:           Simple
Cabal-version:        >=1.2

Library
  Build-depends:      base >= 4 && < 5
  Extra-Libraries:    qd
  Exposed-modules:    Numeric.QD
                      Numeric.QD.Bits
                      Numeric.QD.Bits.Raw
                      Numeric.QD.DoubleDouble
                      Numeric.QD.DoubleDouble.Raw
                      Numeric.QD.FPU
                      Numeric.QD.FPU.Raw
                      Numeric.QD.QuadDouble
                      Numeric.QD.QuadDouble.Raw
                      Numeric.QD.Raw
  GHC-options:        -O2 -Wall -fno-excess-precision
  GHC-prof-options:   -O2 -Wall -fno-excess-precision -prof -auto-all -caf-all