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

Start to reduce/refactor arithmetic ... #889

Merged
merged 1 commit into from
Jul 25, 2023
Merged

Conversation

rocky
Copy link
Member

@rocky rocky commented Jul 24, 2023

Remove stuff from mathics.builtin.arithmetic that does not belong there:

  • _MPMathFunction -> MPMathFunction and move to mathics.buitin.base
  • _MPMathMultiFunction -> MPMathFunction and move to mathics.builtin.base
  • Abs, Piecewise, RealAbs, RealSign, Sign moved to mathics.builtin.numeric to follow WMA organization better

The corresponding eval_ routines will be gone over in another PR. This one is already large.

Url's gone over to make this not exceed standard line limit. Note that the formatting has been gone over to follow the existing pattern that we have been using.

cythonization in mathics.builtin class files removed. It is not clear this has benefit in modern Pythons, especially in this kind of builtin function and all of this needs to be retested if not rethought.

Remove stuff from mathics.builtin.arithmetic that does not belong there:

* _MPMathFunction -> MPMathFunction and move to mathics.buitin.base
* _MPMathMultiFunction -> MPMathFunction and move to mathics.builtin.base
* Abs, Piecewise, RealAbs, RealSign, Sign moved to numeric to follow WMA
  organization better

The corresponding eval routines will be gone over in another PR. This
one is already large.

Url's gone over to make this not exceed standard line limit.
Note that the formatting has been gone over to follow the existing
pattern that we have been using.

cythonization in mathics.builtin class files removed. It is not
clear this has benefit in modern Pythons, especially in this kind of builtin function
and all of this needs to be retested if not rethought.
@rocky rocky requested a review from mmatera July 24, 2023 10:31
@mmatera
Copy link
Contributor

mmatera commented Jul 24, 2023

@rocky,
I am OK in general with these changes, but once merged, they will produce many merge conflicts with #886. I admit that #886 still requires a little work, but that work is going to be easier if we avoid touching the involved files.

@mmatera
Copy link
Contributor

mmatera commented Jul 25, 2023

@rocky, I check it out and it seems that this just produces a moderated number of conflicts with #886, so let's merge this if you feel it is ready.

@rocky rocky merged commit fbef666 into master Jul 25, 2023
@rocky rocky deleted the partial-arithmetic-refactor branch July 25, 2023 02:51
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

Successfully merging this pull request may close these issues.

2 participants