Latest from Google Tech Center

C program to implement the Lagrange interpolation

Print
PDF

#include<stdio.h>
#include<conio.h>
#define MaxN 90

void main()
{
float arr_x[MaxN+1], arr_y[MaxN+1], numerator, denominator, x, y=0;
int i, j, n;
clrscr();
printf("Enter the value of n: \n");
scanf("%d", &n);
printf("Enter the values of x and y: \n");
for(i=0; i<=n; i++)
scanf("%f%f", &arr_x[i], &arr_y[i]);
printf("Enter the value of x at which value of y is to be calculated: ");
scanf("%f", &x);
for (i=0; i<=n; i++)
{
numerator=1;
denominator=1;
for (j=0; j<=n; j++)
if(j!=i)
{
numerator *= x-arr_x[j];
denominator *= arr_x[i]-arr_x[j];
}
y+=(numerator/denominator)*arr_y[i];
}
printf("When x=%4.1f y=%7.1f\n",x,y);
getch();
}

Google Connect

Google News

ZIP and RAR files support now available within the Google Docs Viewer

Downloading files that you only need to preview can create unnecessary clutter on your computer. While you can already use the Google Docs Viewer to view over 15 different file types in Gmail without downloading them, today Google has  added support for archive file types ZIP and RAR. Now, if someone sends you a ZIP or RAR file in Gmail, you’ll be able to view its contents from within your browser by clicking on View.

 

 

http://gmailblog.blogspot.com/2011/07/zip-and-rar-support-now-available-in.html