I want my function to read in an integer and return the square root rounded down to the nearest integer. This is what I've tried:
roundSqrt :: Int -> Int
roundSqrt x = floor (sqrt x)
The error I get is, "Could not deduce (Floating a) arising from a use of -sqrt'", but I don't understand what this means.