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

FE vs. CL: Incorrect flattening of Times *is* sometimes meaningful. #1

Open
rljacobson opened this issue Mar 25, 2020 · 0 comments
Open
Labels
needs clarification There is a question about the issue

Comments

@rljacobson
Copy link
Contributor

rljacobson commented Mar 25, 2020

Issue is in Resources/KernelVsFE.md. From https://mathematica.stackexchange.com/a/216984/27662:

For example the Times issue you point out is not, in fact, always, semantically insignificant (for finite precision arithmetic). We actually have a fix for that in our internal prototype build and I'm optimistic it will make into our next major release. – Itai Seggev

IEEE floating point arithmetic is not associative. Here is a case where this behavior regroups parentheses:

(Notebook) In[1]:= FullForm[Hold[2*-+3]]
(Notebook) Out[1]//FullForm= Hold[Times[2,Times[-1,Plus[3]]]]

(Terminal) In[1]:= FullForm[Hold[2*-+3]]
(Terminal) Out[1]//FullForm= Hold[Times[2,-1,Plus[3]]]

But it's not clear to me how these could ever be different even if finite precision is used. Maybe there is a variation on this bug?

@rljacobson rljacobson added the needs clarification There is a question about the issue label Mar 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs clarification There is a question about the issue
Projects
None yet
Development

No branches or pull requests

1 participant