> Can anyone please help me.
> How can you divide two floats? (and return a float, even if they divide
> equally)
> Ie (something like...) div 2.4 1.2 ---> 2.0
The above doesn't work since div can only be applied to integral numbers:
div :: Integral a => a -> a -> a
What you need is the operator (/) which can only be applied to fractional
numbers:
(/) :: Fractional a => a -> a -> a
For example:
2.4 / 1.2 ---> 2.0
or (/) 2.4 1.2 ---> 2.0
Dan Russell
Kingston University
_______________________________________________
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell