Re: [sympy] Re: C Code Generator

2023-03-23 Thread Alan Bromborsky
Since people have been introducing themselves I thought I would do the same.  My name is Alan Bromborsky and I am an old fart, 76, and have been coding since the early 70's.  I graduated from the Newark College of Engineering (now the New Jersey Institute of Technology) in 1968 with a B.S.E.E. 

Re: [sympy] Re: C Code Generator

2023-03-22 Thread Aaron Meurer
On Sun, Mar 19, 2023 at 7:09 PM brombo wrote: > > First I think there is a problem with ccode doing what it is supposed to do. > Consider the following code - > (x,y,th) = symbols(r"x' y' \theta") > > then > x' = ccode(x) > y' = ccode(y) > \theta = ccode(th) > > I don't think x', y', and \theta

Re: [sympy] Re: C Code Generator

2023-03-19 Thread brombo
First I think there is a problem with ccode doing what it is supposed to do. Consider the following code - (x,y,th) = symbols(r"x' y' \theta") then x' = ccode(x) y' = ccode(y) \theta = ccode(th) I don't think x', y', and \theta are legal program variables in c. Also I have looking at codegen e

Re: [sympy] Re: C Code Generator

2023-03-18 Thread Jason Moore
You can make custom printers for any SymPy function to return what you desire. Subclass the C printer and overwrite/create methods for your functions. The current c code printer does not target any specialized C libraries (but that would be a nice addition!). Jason moorepants.info +01 530-601-9791

[sympy] Re: C Code Generator

2023-03-18 Thread brombo
I have looked further and while ccode(expr) can export functions like sin, cox, exp it cannot export special functions such as bessel, elliptic, etc.. Is there a way to export special functions into c-code? On Saturday, March 18, 2023 at 9:52:48 AM UTC-4 brombo wrote: > Does the C code generato