JuliaSymbolics / Symbolics.jl

Symbolic programming for the next generation of numerical software
https://docs.sciml.ai/Symbolics/stable/
Other
1.37k stars 153 forks source link

build_function(expr, params, target=CTarget()) converts Rational to //, which is a C comment #841

Open eswagel opened 1 year ago

eswagel commented 1 year ago

I'm using build_function to convert a Symbolics expression to a C function. The symbolic expression includes rationals, for example 1//2. These are converted verbatim to C, where they become comments rather than division.

shashi commented 1 year ago

is the correct output /?

eswagel commented 1 year ago

I think that's best so you don't have to include anything in C.