Skip to content
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

Division not working properly #85

Open
deus-est-machina opened this issue Oct 11, 2022 · 2 comments
Open

Division not working properly #85

deus-est-machina opened this issue Oct 11, 2022 · 2 comments

Comments

@deus-est-machina
Copy link

Division Tests:

mathy simplify "12 / 6"
✔ Solved! 12 / 6 = 2
initial-state(-1)         | 12 / 6
constant arithmetic(1)    | 2
mathy simplify "12x / 6x"
✘ Failed to find a solution :(

Is this outside the scope of the project?

@justindujardin
Copy link
Owner

Is this outside the scope of the project?

Yeah, the second case you show is not currently supported by the transform rules that are implemented. If you wanted to support this case you'd need to add a new rule that knows what to do to simplify fractions. Adding that would be a welcome addition to the mathy_core library!

You can find out more about implementing new rules on the website: https://mathy.ai/rules/overview/

You can see an example of an implemented rule here: https://github.com/mathy/mathy_core/blob/master/mathy_core/rules/distributive_factor_out.py

And the associated unit tests to verify that the rule works as expected here: https://github.com/mathy/mathy_core/blob/master/mathy_core/rules/distributive_factor_out.test.json

Finally, the documentation page that describes how the rule works: https://mathy.ai/rules/distributive_property_factor_out/

@deus-est-machina
Copy link
Author

w000t!!!

I'll have a look at it and start cracking.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants