View Single Post
Old Oct 21st, 2006, 3:05 PM   #3
Sane
Programming Guru
 
Sane's Avatar
 
Join Date: Apr 2005
Posts: 1,827
Rep Power: 5 Sane will become famous soon enough
What niteice said. But you must also include the math.h library.

#include <math.h>

Then, for sake of listing alternatives, you can also do...
x_sqrt = pow(x, 0.5)

Although I'm not sure if "pow" accepts a float as a second argument.
Sane is offline   Reply With Quote