combinatorial-problems-0.0.5: A number of data structures to represent and allow the manipulation of standard combinatorial problems, used as test problems in computer science.

Portabilityportable
Stabilityprovisional
MaintainerRichard Senington <sc06r2s@leeds.ac.uk>
Safe HaskellSafe-Inferred

CombinatorialOptimisation.TSP.FixedPoint

Description

Simple library for fixed point arithmetic. Pure Haskell style, unlikely to be efficient. Really this has been added as a bit of a hack at the present time to remove rounding errors in the TSP implementation (which was having them from the use of Float and Double). Not intended to be a full library on it's own, but I guess I see what happens.

Internally uses Int64 as the data type and this is then divided to 32 bits below the point, 31 above and the sign is still in place. Basic arithmetic becomes simple integer arithmetic (what I really really want), multiplication and division has to make use of conversion to Integer type and shifting, probably not that fast.

Documentation

newtype FP Source

Constructors

FP Int64 

Instances