Given the following Rational:
Prelude> x
1 % 2
I tried to take my square root:
Prelude> sqrt x
<interactive>:14:1:
No instance for (Floating Rational) arising from a use of `sqrt'
In the expression: sqrt x
In an equation for `it': it = sqrt x
I read this conversion math article . But I have not seen how to convert between Rational and Floating.
How can i do this?
source
share