I know EngineeringForm is a wrapper which prevents evaluation of content, but pasting chunks of other cells with an EngineeringForm number, got these two simple expressions w/ the same input appearance but wrong, different (complex) outputs (100.+7.55043i and 0.002815+0.000212246i). Was able to fix it only through a direct RowBoxes edit. The second is an intermediary edit of the first raw code, but still a wrong expression w/ same display. IMHO the main issue is that the wrong cell code was formed by copy and paste input and it was evaluated w/o error ! At the end of this post is the correct raw code (output: 0.02+0.254646i) you get by typing it again. My question is: How could one check the expression correctness ? If I share my cell data, how can others know the expression is corrupted ?
UPDATE: Similar problems both flagged as bugs and corrected: Why a function returns two different values if copied into a Notebook or imported with Get from a Wolfram Mathematica Package? (no error indication) and How to find pieces of code responsible for syntax errors? (here a syntax error was indicated, but the Boxes problem seems to be quite similar).
Input Expression in as in "latex 'copy as'" shows a hidden parenthesis, not present in the displayed cell expression:
$$ i 120 \pi \left(\frac{28.15}{10^6}+\frac{1}{\frac{i 120 \pi 10}{10^3}}+\frac{1}{50}\right)$$
The displayed (and correct) expression have no parenthesis:
$$ i 120 \pi 28.15 \times 10^{-6}+\frac{1}{\displaystyle i 120 \pi 10\times 10^{-3}}+\frac{1}{50}$$
First (wrong) boxes expression:
Cell[BoxData[
RowBox[{"\[ImaginaryJ]", " ", "120", " ", "\[Pi]",
TagBox[
RowBox[{
RowBox[{"(",
RowBox[{"28.1448", " ",
SuperscriptBox["10",
RowBox[{"-", "6"}]]}], ")"}], "+",
FractionBox[
StyleBox["1",
ShowStringCharacters->False],
RowBox[{"\[ImaginaryJ]", " ", "120", " ", "\[Pi]", " ", "10", " ",
SuperscriptBox["10",
RowBox[{"-", "3"}]]}]], "+",
FractionBox["1", "50"]}],
EngineeringForm]}]], "Input"]
Second (wrong) boxes expression:
Cell[BoxData[
RowBox[{"\[ImaginaryJ]", " ", "120", " ", "\[Pi]", " ", "28.15", " ",
SuperscriptBox["10",
RowBox[{"-", "6"}]],
RowBox[{
RowBox[{"+",
SuperscriptBox[
RowBox[{"(",
RowBox[{"\[ImaginaryJ]", " ", "120", " ", "\[Pi]", " ", "10", " ",
SuperscriptBox["10",
RowBox[{"-", "3"}]]}], ")"}],
RowBox[{"-", "1"}]]}], "+",
FractionBox["1", "50"]}]}]], "Input"]
Correct boxes expression:
Cell[BoxData[
RowBox[{
RowBox[{"\[ImaginaryJ]", " ", "120", "\[Pi]", " ", "28.15", " ",
SuperscriptBox["10",
RowBox[{"-", "6"}]]}], "+",
SuperscriptBox[
RowBox[{"(",
RowBox[{"\[ImaginaryJ]", " ", "120", "\[Pi]", " ", "10", " ",
SuperscriptBox["10",
RowBox[{"-", "3"}]]}], ")"}],
RowBox[{"-", "1"}]], "+",
FractionBox["1", "50"]}]], "Input"]
]
? $\endgroup$