I want to make this into a formula, how do I go about it?
W = 13.12 + 0.6215t - 11.37v^016 + 0.3965tv^0.016
Also, I tried doing this to try out the exponent but unfortunately it does not give me the correct answer for an exponent, why is that? What does the "^" do in c++?
1 2 3 4 5 6 7 8 9 10 11 12
#include <iostream>
#include <cmath>
usingnamespace std;
int main()
{
int c = 2^2;
cout << c;
}
pow can do fractional exponents, so it can also do sqrt etc, (pow(x, 0.5) for example). Because of this, its a bit slower than you might expect. Consider just doing X*X etc for very small powers (often code needs no more than squares). Its powerful (hah) but not always optimal.
You can look up the bitwise operators... ( |, &, ^, etc). Im right there to say that ^ should have been power. They ran out of symbols.