[Haskell-cafe] Typing problems with basic arithmetic - help!

Henning Thielemann lemming at henning-thielemann.de
Mon Sep 26 06:38:40 EDT 2005


On Fri, 23 Sep 2005, Marcin Tustin wrote:

>   Thanks for this: All I have to do now is fix the fact that my maths is stupidly screwed!

'div' is the integer division and rounds down. You should either use
Rational (or Double) everywhere or use % which builds a ratio from two
integers.




More information about the Haskell-Cafe mailing list