Skip to content

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

@rljacobson

Description

@rljacobson

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions