-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Robust rate expressions #100
Robust rate expressions #100
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you found any theoretical studies describing rational function expressions? It seems like every function allowed by this grammar should be convertible to a fraction of two polynomials, but is it really the case? Maybe I'm missing some mathematical fundamentals, but somehow, I feel like I need proof. 😃
Well, I relied on my mathematical common sense and that you would point out if it was insufficient 😄 I also feel like I am missing something and especially because it was just a small change. But based on these articles from online Encyclopaedia of Mathematics: Rational function and Polynomials. The first article states that rational expression is essentially a fraction of two polynomials. And the second states that polynomial is a mathematical expression that involves variables raised to whole number powers and coefficients. I think all these operations should be covered in the grammar. |
@daemontus what do you think about this? Any insight on "rational expressions"? |
I think this is essentially the correct conclusion. Any function that uses arbitrary combinations of operators The only issue is that this "canonical representation" using two polynomials is often quite large, but that shouldn't be relevant here. Basically, the rationale behind the conversion is that without the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright then, thanks a lot for the comment @daemontus !
Let's merge it then @mopichalova, amazing job!
This update aims to close #87, which highlighted the limitations in representing complex rational expressions. Previously, the grammar supported only basic rational expressions without the capability for nesting divisions.
Only a small change has been made, by moving the
fun "/" fun
rule from being an exclusive part of the!rate
rule to being incorporated within the!fun
rule itself construction of more complex fractions and rational expressions is enabled.Extensive tests have been added to cover the new grammar capabilities, ensuring that nested divisions are handled correctly and that the change does not introduce any regressions.