Top "Sqrt" questions

The `sqrt` function returns the positive square root of a number in several programming languages.

How do I calculate square root in Python?

Why does Python give the "wrong" answer? x = 16 sqrt = x**(.5) #returns 4 sqrt = x**(1/2) #returns 1 Yes, I know import math and …

python math sqrt
Finding square root without using sqrt function?

I was finding out the algorithm for finding out the square root without using sqrt function and then tried to …

c++ algorithm math sqrt
Integer square root in python

Is there an integer square root somewhere in python, or in standard libraries? I want it to be exact (i.…

python math integer sqrt
Get sqrt from Int in Haskell

How can I get sqrt from Int. I try so: sqrt . fromInteger x But get error with types compatibility.

haskell types sqrt
python math domain error - sqrt

What causes the problem? from math import sqrt print "a : " a = float(raw_input()) print "b : " b = float(raw_input()) …

python math dns sqrt
Is it possible to roll a significantly faster version of sqrt

In an app I'm profiling, I found that in some scenarios this function is able to take over 10% of total …

c++ optimization sqrt
'sqrt' is not a member of 'std'

I compile my program in linux - it has the following line : std::sqrt((double)num); On windows it is …

c++ math std sqrt
Value Error: math domain error in Python

I'm writing a code to help me solve the Pythagorean theorem in Python. Problem is, I keep getting this one …

python math python-idle sqrt
check if number string contains decimal?

After doing a sqrt() How can I be check to see if the result contains only whole numbers or not? …

javascript regex math decimal sqrt
sqrt() function not working with variable arguments

I don't know if I'm missing something obvious, but it appears that I'm unable to compute square roots of a …

c compiler-errors math.h sqrt