Closed MarcoCostantini closed 4 years ago
Hi,
This is because for every function a mapping has to be defined, eg mapping for sine looks like this:OMDef( "Sin" , "transc1","sin" );
Majority of standard (this is existing in mainstream mathematics) functions have such mapping defined, Solve()
doesn't. I've added mapping for Solve()
and your example works as expected, so I'll close the issue now. But if you need other functions to be properly mapped, just lt me know.
With respect to the other issue, OMS("yacas","Solve")(x,x)
simply isn't syntactically correct, hence the error.
Anyway, thanks a lot for the effort, thanks to you OpenMath support has a chance to improve :)
Cheers, Grzesiek
There can be a lot of yacas functions without a corresponding openmath function, and more can be added in future. Is it possible to have a general mechanism, so that for every yacas function without the corresponding openmath function this translation is done automatically in both verses?
Consider the example at page https://yacas.readthedocs.io/en/latest/reference_manual/functional.html t(x) := If(x<=0.5, 2x, 2(1-x));
OMForm(If(x<=0.5, 2x, 2(1-x))) produces and openmath object, and when I convert it back to yacas, I get OMS("yacas","If")(x<=0.5,2x,2(1-x))
Let's consider a Yacas object:
if this object is converted to OpenMath, then a dummy object
<OMS cd="yacas" name="..."/>
is created, and this is OK:Of course, it's not possible to do much with this dummy object, but it should be possible at least to convert it back to Yacas, to get the starting object, but it doesn't work:
By the way, what about this error?