Question: C++ question. Please fix my code to work as the instruction. #includeiostream #include-loma nip> #include-cmath using namespace std; double arctanApprox (double x,double tol) int i-1;
C++ question. Please fix my code to work as the instruction.




#includeiostream #include-loma nip> #include-cmath using namespace std; double arctanApprox (double x,double tol) int i-1; double d1; double sum-0; double prevsum-0; while(true) if ( i%2- 1) sum sum+(pow(x,d)/d); else sum sum+(pow(x,d)/d); if(abs (prevsum-sum)>tol; if(tol
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
