hi, after a long time been posting in this forum.I am trying to manipulate newtons divide difference formula ,actually like this [see here](http://www.dailyfreecode.com/code/newtons-divided-difference-method-2381.aspx) but in a different manner .but my code is not working.i am getting disgusting values in my table.can any one please check the errors and tell me what it is .my code is like this.Thanks !!!!! #include<stdio.h> #include<conio.h> #include<stdlib.h> int main() { int x[10],p,i,n,m,k,j; float y[6][5]; printf("how many numbers?"); scanf("%d",&n); for(i=0;i<n;i++){ scanf("%d",&x[i]); } i=0; j=0; while(j<n){ scanf("%lf",&y[j][i]); j++; } for(i=0;i<n;i++){ printf("x[%d]=%d",i,x[i]); } i=0;j=0; printf("\n"); while(j<n){ printf("y[%d][%d]=%lf",j,i,y[j][i]); j++; } printf("\n"); k=0; m=1; for(i=1;i<n;i++){ for(j=0;j<n-i;j++){ y[j][i]=((y[j+1][i-1]-y[j][i-1])/(x[k+m]-x[k])); k++; } k=0; … |
-1
21 | ||

hai every one , i have problem with order by decimal number I have revision number column it contains revision number like 1, 2, 2.1, 2.2, 2.3 ...... 2.10 2.11 ... and am trying to order by revision it's giving sort order like 1, 2, 2.1 2.10 2.11 ... 2.2 2.3 ... but i want sort order like.. 1, 2, 2.1, 2.2, 2.3 .. 2.10 2.11 query is like SELECT project_name, revision_no from table_name ORDER BY project_name, revision_no thank you |
0
13 | ||

I came up with a bit of code that I think will theoretically factor any given integer within the range of integers. I'm posting this thread to ask two questions: First, is there any way that I can do this more efficiently, and second, what is the easiest way to do this using arrays. Thank you in advance for your helpful feedback, and I hope this thread can help some people (including myself) get all the more proficient at coding. So here's the code I came up with: #include "stdafx.h" #include <iostream> #include <string> using namespace std; int main(void) { … |
0
5 | ||

The program is supposed to compute the values of [URL="http://mathworld.wolfram.com/GammaFunction.html"]Euler's Gamma Function[/URL] using an infinite product (formula #15 in the link), and it does so decently for low values, but the error gets too big for bigger values. Using both Mathematica and Maxima for reference this is what I get for Gamma(19.9): Gamma(19.9)~9.0406e16 Mathematica and Maxima difference: 9.6e2 Difference between my functions and Mathematica: 1.79e11 Difference between both of my functions: 1.21e5 What surprises me as well is similarity of results for both of my functions, because the second one gets to multiply values like 1e66 and 1e-61, while the … |
0
3 | ||

Hi, I am developing some code to run on hardware and I am using the sin() and cos() functions inside the standard math.h many times, which slows the program down dramatically. I was wondering if there is a way to "approximate" the sine and cosine of a value (angle is between 0 and 2pi). Apparently there is a way to do it using look up tables but I don't really know how to create one? I would like to do it using just basic arithmetic operators, no math.h functions. Is there a simple way to compute the sine and cosine … |
0
7 | ||

HI there. We are currently creating a page which contains (a) 10 Check Boxes (b) for each check box there is a radio button list with 10 values. What we want to achieve is the following When e.g. The first checkbox is checked, the forst radio button list should be made enabled with script - this has been achieved. However, lets say they check the first 3 check boxes, the first 3 radio buttton lists should then be made enabled, which works fine, but now i want to limit the users raning to 3 instead of 10, and also not … |
0
1 |

The End.