grzegorzmazur / yacas

Computer calculations made easy
http://www.yacas.org
GNU Lesser General Public License v2.1
124 stars 24 forks source link

RForm: Pi #280

Closed mikldk closed 4 years ago

mikldk commented 4 years ago

As reported on https://github.com/mikldk/ryacas/issues/31 it seems like RForm() does not handle Pi properly. Maybe a line in r_form.rep/code.ys is needed, e.g. {"Pi","pi"},, although I am not sure if it should be listed among functions or have its own rule.

grzegorzmazur commented 4 years ago

Right, I've missed this one. There's no translation table for constants (there were only two till now, True and False), so I've just added another rule for Pi.

mikldk commented 4 years ago

Thank you very much!

mikldk commented 4 years ago

@grzegorzmazur: I think Infinity is missing, too. It must be translated to Inf. Or am I mistaken?

mikldk commented 4 years ago

Sorry... What about Undefined, too? Maybe as NaN?

grzegorzmazur commented 4 years ago

Ok, seems reasonable. It's not exactly the same, but close enough. But for this one you'll have to wait till tomorrow.

Btw, I'm going to release version 1.8 tomorrow.

mikldk commented 4 years ago

Perfect! Thanks!