Portability | portable |
---|---|

Stability | provisional |

Maintainer | Richard Senington <sc06r2s@leeds.ac.uk> |

Safe Haskell | Safe-Inferred |

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.