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

Times should have always at least 2 elements #891

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

mmatera
Copy link
Contributor

@mmatera mmatera commented Jul 28, 2023

This PR fixes a tiny inconsistency. In WMA, pHoldForm[Times[expr]] produces as a formatted output Times[expr]. Our current format_times function hides this, but the issue is revealed if we rewrite it to make it closer to the WMA routine.

@rocky
Copy link
Member

rocky commented Jul 30, 2023

I tried in the master branch and in this branch and in both cases I see:

In[1]:= HoldForm[Times[expr]]
Out[1]= expr

(I do see on WMA that we get Times[expr] for Out[1].)

@mmatera
Copy link
Contributor Author

mmatera commented Aug 2, 2023

This is what you get in WMA:

In[1]:= HoldForm[Times[expr]]                                                   

Out[1]= Times[expr]

In[2]:= HoldForm[Times[]]                                                       

Out[2]= Times[]

and this is what this PR tries to fix.

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