0
pseudobluz's Avatar, Join Date: Dec 2009
Go4Expert Member
Here is the english version:
http://rapidshare.com/files/324297385/cprog-eng.c.html

If you want to understand logic, you have to know Horner's scheme:
http://en.wikipedia.org/wiki/Horner_scheme

It is pretty simple but effective algorithm for evaluation of polynomials.

Note: There are some more functions in code, than it's really needed. I have added those in process of debugging to check out certain segments of code.

Can you please send me exe file of my code? I want to check out that.
I suspect now the source of the problem is maybe 32-bit compiler on 64-bit machine.
0
techgeek.in's Avatar, Join Date: Dec 2009
Skilled contributor
yah i think that thatz the only problem. Try to run ur code in 32bit system. here is the link for ur exe:-
http://rapidshare.com/files/324322882/CPROG.EXE.html
0
pseudobluz's Avatar, Join Date: Dec 2009
Go4Expert Member
Thanks, mate! I'll try that on my friend's 32bit pc and see what happens.
0
pseudobluz's Avatar, Join Date: Dec 2009
Go4Expert Member
I made it

The problem was with one pointer referring to NULL value.

Here is the corrected version:

Code:
struct pnode *bform(struct pnode *coeff, int a)
{
             struct pnode *p=coeff;
         struct pnode *temp1=p;
         struct pnode *proba=NULL;     
         double b=temp1->coeff;
         proba=insert(proba,1,b);
         while(temp1->link!=NULL)
         {   
             temp1->link->coeff=a*(temp1->coeff)+(temp1->link->coeff);
             proba=insert(proba,1,temp1->link->coeff);
             temp1=temp1->link;
             
         }
         return(proba);
}
So, if anyone needs this prog for computing Horne's scheme, I ll translate it and upload.
It's not a big deal, but I couldn't find anyone did this using linked lists.
It's way easier with arrays.