Question and Answers Forum | ||
Question Number 175785 by otchereabdullai@gmail.com last updated on 06/Sep/22 | ||
![]() | ||
Commented by Ar Brandon last updated on 07/Sep/22 | ||
#include <stdio.h> #include <math.h> int main(void) { double fx, gx, xn, x_m; printf("Enter initial value:"); scanf("%lf", &xn); for(int i=0; i<100; i++) { fx = pow(xn, log(2)/log(3))-sqrt(xn)-1; gx = log(2)/log(3)*pow(xn,log(2)/log(3)-1) -0.5/sqrt(xn); x_m = xn - fx / gx; xn = x_m; } printf("x ≈ %.2f\n", xn); return 0; } | ||
Commented by Ar Brandon last updated on 07/Sep/22 | ||
![]() | ||
Commented by Frix last updated on 07/Sep/22 | ||
![]() | ||
Answered by Ar Brandon last updated on 07/Sep/22 | ||
![]() | ||
Answered by LordKazuma last updated on 07/Sep/22 | ||
![]() | ||
| ||
Commented by LordKazuma last updated on 07/Sep/22 | ||
![]() | ||