-
Notifications
You must be signed in to change notification settings - Fork 5
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
Fractional math example (don't break things!) #11
Comments
Very nice, thank you! This was really just a test to show that one could perform such transformations ... but it is certainly a good idea to do it correctly, like Diofant does. Diofant looks like a nice project. |
On Thu, Apr 15, 2021 at 03:25:34AM -0700, André Roberge wrote:
but it is certainly a good idea to do it correctly
I'm not sure that for non-ast case it will simplify things. Maybe, it's
just not a good example to introduce token-based transformations.
|
I think I will keep the token based transformation as an example of the weakness of this approach compared with using an AST transformation. I've made the change but will keep this issue open as a reminder that I need to improve the documentation on these two cases - and perhaps add a parameter to select which mode to use in a console so that the AST example works like one would expect. |
You can avoid ugly workarounds (like
range()
case), if you wrap only integer divisions with Fraction's, like Diofant does.The text was updated successfully, but these errors were encountered: