I have a simple formula and I want to use it in C++ application. Not sure how to rewrite in C++.
Asked
Active
Viewed 145 times
-4

ΦXocę 웃 Пepeúpa ツ
- 47,427
- 17
- 69
- 97

jack
- 1
- 4
-
so why the c tag, c++ is different from c. ok please remove the c tag – Seek Addo Feb 19 '17 at 12:49
-
2where is the integral in this? (btw. you usually approach integrals by discretizing & summing). – lorro Feb 19 '17 at 12:57
-
2We do people answer him? He didn't put any snippet of his own, he clearly wants someone to do it for him – user3104201 Feb 19 '17 at 13:14
-
@user3104201 If you can not answer please zip up. – jack Feb 19 '17 at 16:11
-
If you can not answer please zip up .@user3104201 – jack Feb 19 '17 at 16:18
2 Answers
4
logn(5, abs((a*b - d*c) / (tan(c) + sin(d))))
where logn
is:
double logn(double base, double x) {
return log(x) / log(base);
}
and the header cmath
is included for the other functions.

Emil Laine
- 41,598
- 9
- 101
- 157
0
You can do this, be careful with libs, namespaces, and radian arguments
z = a*b - d*c;
s = tan(c) + sin(d);
num = abs(z/s);
log(num)/log(5);

ΦXocę 웃 Пepeúpa ツ
- 47,427
- 17
- 69
- 97