Skip to content

Fixtimesinfinity#1205

Merged
rocky merged 11 commits intomasterfrom
fixtimesinfinity
Mar 26, 2021
Merged

Fixtimesinfinity#1205
rocky merged 11 commits intomasterfrom
fixtimesinfinity

Conversation

@mmatera
Copy link
Copy Markdown
Contributor

@mmatera mmatera commented Mar 26, 2021

This PR tries to fix errors and inconsistencies in expressions involving products of complex numbers and Infinity quantities.

adding an option to mathics/test.py for storing errors in a log file. Fixing some tests. Fixing -Infinity.

adding an option to mathics/test.py for storing errors in a log file. Fixing some tests. Fixing -Infinity.
@mmatera mmatera requested a review from rocky March 26, 2021 15:17
Comment thread mathics/builtin/arithmetic.py Outdated
"DirectedInfinity[a_?NumericQ] /; N[Abs[a]] != 1": "DirectedInfinity[a / Abs[a]]",
"DirectedInfinity[a_] * DirectedInfinity[b_]": "DirectedInfinity[a*b]",
"DirectedInfinity[] * DirectedInfinity[args___]": "DirectedInfinity[]",
"DirectedInfinity[0]": "DirectedInfinity[]",
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.

flake8 correctly informs me that "DirectedInfinity[0]" appears twice. See below in line 1116. The second occurrence (that is, not this one), will be the one used.

If that is what is desired then it would be better to remove this line.

Copy link
Copy Markdown
Member

@rocky rocky left a comment

Choose a reason for hiding this comment

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

LGTM - but please note the comment about the duplicate dictionary key that appears.

@mmatera
Copy link
Copy Markdown
Contributor Author

mmatera commented Mar 26, 2021

Thanks! I fixed this here. Shall I merge this if this pass the tests?

@rocky
Copy link
Copy Markdown
Member

rocky commented Mar 26, 2021

Thanks! I fixed this here. Shall I merge this if this pass the tests?

Yes - and then if we could rebase (not merge) master onto the extensecmptests branch that would be good.

When we have several branches that all want to go into master with the exact code, it is hard to understand what is going on individually because of the duplication which obscures the essential part of the PR.

Thanks.

@mmatera
Copy link
Copy Markdown
Contributor Author

mmatera commented Mar 26, 2021

Indeed. I am trying to keep the extensecmptests updated with the changes in fixtimesinfinity, and make that more tests pass. What I wasn't sure is if it is better to merge the parts that are working now, or to have a merge with the complete fix.

@rocky
Copy link
Copy Markdown
Member

rocky commented Mar 26, 2021

Ok - then let's merge this. I'll do the rebase after the merge.

@rocky rocky merged commit 0894d8e into master Mar 26, 2021
@rocky rocky deleted the fixtimesinfinity branch July 15, 2021 12:13
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