Bill Allombert on Wed, 2 Jul 2003 21:56:06 +0200

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: using zbrent in C mode

On Wed, Jul 02, 2003 at 08:58:55PM +0200, Olivier Ramare wrote:
> Dear all,
>   I'll be able to program in pari-C one day ...
> Just now, can anyone tell me how to program that
> x=solve(t=a,b,sin(t))

Short answer: You cannot.

Long answer: You can try to use lisexpr(): 

  sprintf(str, "solve(t=%s,%s,sin(t))", GENtostr(a), GENtostr(b) );
  x = lisexpr(str);

> Yes, it looks stupid ....

That one cannot do that in C ? I agree. Several interfaces
have been discussed between Karim and I but we never managed
to do anything.

(The discussions boiled down to use pointers to a function for
iterators like zbrent, but it would not be GP2C friendly due
to different lexical scoping).