Skip to content

SameQ testing against Precision Real and adding SameQ unit tests#147

Merged
rocky merged 9 commits intomasterfrom
fix_issue146
Feb 3, 2022
Merged

SameQ testing against Precision Real and adding SameQ unit tests#147
rocky merged 9 commits intomasterfrom
fix_issue146

Conversation

@mmatera
Copy link
Copy Markdown
Contributor

@mmatera mmatera commented Feb 2, 2022

This PR fixes the issue #146:

  • Improved sameQ routine for PrecisioReal and MachineReal to behave like in WMA.
  • Adding tests.

One alternative would be to ask to the sympy developer team to implement a similar fix.

Comment thread mathics/core/atoms.py Outdated
other_value = other.value
else:
return False
value = self.value
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this logic could be simplified by moving it in the "then" branch above.

Also, I think the docstring here could be more detailed.

I also see that none of the Comparison operators appear in the docs.

I will put in a PR based on this to start to address this.

@rocky rocky changed the title Fix issue146 SameQ testing against Precision Real and adding SameQ unit tests Feb 3, 2022
rocky and others added 5 commits February 3, 2022 10:29
* Simplify SameQ logic for MachineReal
* Hook comparison operators into documentation
* Fill out description and examples for SameQ

Note: comparison.py probably should be split out into its own subsection

As always, with recards to documentation, and sectioning gthere is a lot more there to  do.
and document, add examples of that.
Also be more explicit in $MachinePrecision example
Include SameQ changes
@rocky
Copy link
Copy Markdown
Member

rocky commented Feb 3, 2022

Let's merge and continue....

@rocky rocky merged commit c9fbf64 into master Feb 3, 2022
@rocky rocky deleted the fix_issue146 branch February 14, 2022 03:09
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