I want to a solution of quadratic interpolation function with the logX in c programming
Would you tried to help, but I can not find my mistakes
#include <stdio.h>
#include <conio.h>
#include <math.h>
#define f(x) (log(x))
int i,j;
float x[10],y[10],a,b;
main()
{
printf("\n\t kuadratik enterpolasyon yontemi...\n");
printf("x degerlerini giriniz...\n");
for(i=0;i<=2;i++)
for(j=0;j<=2;i+1)
{
printf("x[%d]= ",i);
scanf("%f",&x[i]);
printf("y[%d])= ",j);
scanf("%f",&y[j]);
}
printf(" x degerleri arasindaki bulmak istenen fonksiyon degerini giriniz..");
scanf("%f",&a);
if(a<x[0]||a>x[2])
{
printf("girilen deger bu aralikta degildir...\n");
printf("lutfen tekrar yeni bir deger giriniz...\n");
}
else
{
b=f(x[0])+(f(x[1])-f(x[0]))/(x[1]-x[0])*(a-x[0])+((f(x[2])-f(x[1]))/(x[2]-x[1])-(f(x[1])-f(x[0]))/(x[1]-x[0]))*(a-x[0])*(a-x[1])/(x[2]-x[0]);
printf("log(%f)=%f",a,b);}
getch();
}