7 Maintainer: nbowler@draconx.ca
8 Homepage: http://repo.or.cz/w/altfloat.git
9 Stability: experimental
12 Extra-Source-Files: configure.ac, configure, altfloat.buildinfo.in, cfloat.h
13 config.h.in examples/*.hs
14 Extra-Tmp-Files: altfloat.buildinfo, config.status config.log, config.cache
16 Synopsis: Alternative floating point support for GHC.
18 A replacement for the standard Haskell floating point types and supporting
19 functions. There are a number of shortcomings which I feel severely hinder
20 Haskell's utility for numerical computation. These shortcomings include
22 * There is no way to sanely convert between Haskell's floating types -- not
23 even between Double and CDouble. The implementation of the 'realToFrac'
24 function goes through 'Rational', which loses information as 'Rational'
25 cannot represent all floating point values.
27 * Making floating types an instance of 'Ord' makes no sense. 'Ord' is for
28 totally ordered data types, which floats are not. As a result, a number of
29 library functions (such as 'max' and 'sort') produce nonsensical results.
31 * The 'Enum' instance for floating types similarly makes little sense.
32 While 'fromEnum' and 'toEnum' functions use 'Int' instead of 'Integer',
33 limiting their usefulness, 'pred' and 'succ' can be defined in a much more
36 * Functions that should care about negative zeros, such as 'signum' and
39 * Some functions, such as 'floor', have nonsensical behaviour for
42 * The selection of floating point library functions pales in comparison to
43 C. This problem is made worse since, as noted above, it is impossible to
44 convert losslessly from 'Double' to 'CDouble' in order to use the FFI.
46 * There is no mechanism for handling rounding modes or exceptions.
48 This package is intended to address all of the above issues, and more.
49 Also provided, for convenience, is an alternative to the standard Prelude
50 which includes features from this library and the non-overlapping parts of
53 Source-Repository head
55 Location: git://repo.or.cz/altfloat.git
58 Description: Use the new split integer packages that come with GHC 6.12.
61 Description: Use the integer-gmp package as opposed to integer-simple.
64 Build-Depends: base >= 4 && < 5, ghc-prim
68 Build-Depends: integer-gmp
70 Build-Depends: integer-simple
72 Build-Depends: integer
75 C-Sources: cfloat.c c99-compat.c
78 Data.Floating.Classes,
80 Data.Floating.Types.Double,
81 Data.Floating.Types.Float,
82 Data.Floating.Prelude,
83 Data.Floating.Environment,
87 Data.Floating.Instances, Data.Floating.Helpers,
88 Data.Floating.CMath.Instances,
89 Data.Poset.Internal, Data.Poset.Instances