This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.
/* Newton's method example.
http://en.wikipedia.org/wiki/Newton%27s_method */
#include <stdio.h>
#include <math.h>
/* the function */
#define f(x) exp(2*x)+exp(3*x)-5
/* the derivative on x */
#define f_(x) 2*exp(2*x)+3*exp(3*x)
/* the first quess */
#define x0 -1
/* precision */
#define epsilon 1e-9
int main()
{
double prev,curr,delta;
prev=curr=x0;
while(1)
{
curr = prev - (f(prev)/f_(prev));
delta = fabs(curr-prev);
printf(">> %.10f e=%.10f\n",curr,delta);
if (delta < epsilon)
break;
prev = curr;
}
printf("%.10f\n",curr);
return 0;
}
/* Newton's method example.
http://en.wikipedia.org/wiki/Newton%27s_method */
#include <stdio.h>
#include <math.h>
/* the function */
#define f(x) exp(2*x)+exp(3*x)-5
/* the derivative on x */
#define f_(x) 2*exp(2*x)+3*exp(3*x)
/* the first guess */
#define x0 -1
/* precision */
#define epsilon 1e-9
int main()
{
double prev,curr,delta;
prev=curr=x0;
while(1)
{
curr = prev - (f(prev))/(f_(prev));
delta = fabs(curr-prev);
/*printf(">> %.10f e=%.10f\n",curr,delta);*/
if (delta < epsilon)
break;
prev = curr;
}
printf("root=%.10f, f(root)=%.10f\n",curr,(f(curr)));
return 0;
}
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.