Added special cast to double in Sqrt, to avoid potential error in  multiple overload matches.