more correct markup
[hsqd:hsqd.git] / qd.cabal
1 Name:                 qd
2 Version:              0.2
3 Synopsis:             double-double and quad-double number type via libqd
4 Description:
5                       This package supports both a double-double datatype (approx. 32 decimal digits)
6                       and a quad-double datatype (approx. 64 decimal digits), using libqd (which is
7                       implemented in C++ with C and Fortran wrappers).  To compile this package you
8                       need libqd to be installed.
9                       .
10                       @'Numeric.QD.DoubleDouble.DoubleDouble'@ and @'Numeric.QD.QuadDouble.QuadDouble'@
11                       are strict tuples of @CDouble@s, with the following instances:
12                       .
13                         * @'Eq'@
14                       .
15                         * @'Floating'@
16                       .
17                         * @'Fractional'@
18                       .
19                         * @'Num'@
20                       .
21                         * @'Ord'@
22                       .
23                         * @'Real'@
24                       .
25                         * @'RealFloat'@
26                       .
27                         * @'RealFrac'@
28                       .
29                         * @'Show'@
30                       .
31                         * @'Storable'@
32                       .
33                       But note that the following functions (while present) are @'undefined'@:
34                       .
35                         * @'properFraction'@
36                       .
37                         * @'truncate'@
38                       .
39                         * @'round'@
40                       .
41                         * @'decodeFloat'@
42                       .
43                         * @'encodeFloat'@
44                       .
45                         * @'exponent'@
46                       .
47                         * @'significand'@
48                       .
49                       Non-crashing implementations of these are planned in a future update to
50                       this package, as well as instances of @Enum@ and @Read@.
51                       .
52                       Additional note: libqd depends on 64bit doubles, while some FPU architectures
53                       use 80bit.  It is highly recommended to compile with -fno-excess-precision and
54                       set the FPU control words to avoid erroneous behaviour, perhaps by doing
55                       something like this at the start of your program:
56                       .
57                       > import Foreign (nullPtr)
58                       > import GHC.Conc (forkOnIO, numCapabilities)
59                       > import Numeric.QD.FPU.Raw (fpu_fix_start)
60                       > main :: IO ()
61                       > main = do
62                       >   mapM_ (flip forkOnIO $ fpu_fix_start nullPtr) [ 0 .. numCapabilities - 1 ]
63                       >   -- ...
64
65 License:              BSD3
66 License-file:         LICENSE
67 Author:               Claude Heiland-Allen
68 Maintainer:           claudiusmaximus@goto10.org
69 Category:             Math
70 Build-type:           Simple
71 Cabal-version:        >=1.2
72
73 Library
74   Build-depends:      base >= 4 && < 5
75   Extra-Libraries:    qd
76   Exposed-modules:    Numeric.QD
77                       Numeric.QD.Bits
78                       Numeric.QD.Bits.Raw
79                       Numeric.QD.DoubleDouble
80                       Numeric.QD.DoubleDouble.Raw
81                       Numeric.QD.FPU
82                       Numeric.QD.FPU.Raw
83                       Numeric.QD.QuadDouble
84                       Numeric.QD.QuadDouble.Raw
85                       Numeric.QD.Raw
86   GHC-options:        -O2 -Wall -fno-excess-precision
87   GHC-prof-options:   -O2 -Wall -fno-excess-precision -prof -auto-all -caf-all