Why doesn't Mathematica show the numerical result of
(0.8\[CenterDot]452\[CenterDot]20+1.5\[CenterDot]4180\[CenterDot]10
-2\[CenterDot]900\[CenterDot]100) / (0.8\[CenterDot]452
+1.5\[CenterDot]4180-1\[CenterDot]2\[CenterDot]900) // N
Why doesn't Mathematica show the numerical result of
(0.8\[CenterDot]452\[CenterDot]20+1.5\[CenterDot]4180\[CenterDot]10
-2\[CenterDot]900\[CenterDot]100) / (0.8\[CenterDot]452
+1.5\[CenterDot]4180-1\[CenterDot]2\[CenterDot]900) // N
Just to complete some of the other answers/comments, if you want CenterDot
to be interpreted as Times
in both input and output by using something like
Unprotect[CenterDot, Times];
CenterDot = Times;
Times /: MakeBoxes[Times[a__], fmt_] :=
With[{cbox = ToBoxes[HoldForm[CenterDot[a]]]},
InterpretationBox[cbox, Times[a]]];
Protect[CenterDot, Times];
Which you can add to your init.m if you want it loaded by default.
This works on both numeric and symbolic expressions, e.g.
In[5]:= 1\[CenterDot]2\[CenterDot]3
Out[5]= 6
In[6]:= a b c
Out[6]= a\[CenterDot]b\[CenterDot]c
You can also make the automatically inserted multiplication symbol between space separated numbers be CenterDot
by executing
SetOptions[EvaluationNotebook[],
{AutoMultiplicationSymbol -> True, NumberMultiplier -> "\[CenterDot]"}]
or by selecting Center Dot in the preferences dialog under Appearance > Numbers > Multiplication.
For example:
Just replace \[CenterDot]
by a space
Multiplication in Mathematica is written either as a space (Times[a,b] == a b
) or as an asterisk (Times[a,b] == a*b
). \[CenterDot]
is not interpreted as multiplication.
I think Simon's first method can be written more concisely. Please review:
Unprotect[Times];
CenterDot = Times;
Format[a_*b__] := Interpretation[HoldForm[a\[CenterDot]b], a*b];
Second attempt. I believe this works properly with Convert To > StandardForm
and editing.
CenterDot = Times;
MakeBoxes[Times[x__], _] := RowBox @ Riffle[ToBoxes /@ {x}, "\[CenterDot]"]