How do you get the sqr root to work? I'm tring to write a simiple program for a quadraic equation, to find the roots of a functions. How do I go about doing this?
How do you get the sqr root to work? I'm tring to write a simiple program for a quadraic equation, to find the roots of a functions. How do I go about doing this?
Include math.h and use the function sqrt(), like this:
float num = 9;
num = sqrt(num);
Code:#include <cmath> #include <complex> bool euler_flip(bool value) { return std::pow ( std::complex<float>(std::exp(1.0)), std::complex<float>(0, 1) * std::complex<float>(std::atan(1.0) *(1 << (value + 2))) ).real() < 0; }