Questions tagged [precedence]
For questions about operator precedence.
22
questions
4
votes
1
answer
131
views
Forcing Explicit Parentheses in Traditional Form
I have an expression in input form for the Cosine of a dihedral angle:
...
3
votes
0
answers
41
views
What's the effect of SyntaxForm option in StandardForm boxes of Superscript?
Consider the following sample:
...
1
vote
1
answer
46
views
Finding a list of results of an arithmetic operation with a permutations of precendence
Consider 3* 2 + 2 /4*10
With the default precedence for *,+, and / the result is 11.
I am curious what the results would be for all six choices for the precedence ...
2
votes
1
answer
112
views
Simplify Map on a list of lists
I have the following example list of matrices:
a = {p Table[RandomComplex[], {2}, {2}], q Table[RandomComplex[], {2}, {2}]}
where p and q are real variables. I ...
2
votes
0
answers
68
views
Precedence of @@ vs /@ [closed]
How do I find what I think is called the "precedence" of a given operator. That is, for the following code:
...
11
votes
2
answers
264
views
i_:0|1 varies in v12.1: incompatible change or bug?
Just check
i_: 0 | 1 // FullForm
In v12.0 or earlier the output is
Alternatives[Optional[Pattern[i, Blank[]], 0], 1]
But in ...
3
votes
1
answer
115
views
Why Divide does not give the same answer? [closed]
I saw a question on Facebook $8\div2 (2 + 2)=?$
Consider these inputs.
Divide[8, 2 (2 + 2)]
1
$8\div2 (2 + 2)$ using esc+div+esc
16
Why the results are ...
2
votes
1
answer
112
views
Operator Precedence in Notation Package
I am trying to use the Notation package to define custom notation for chemical reactions. The natural thing to do is to use a
\[LongRightArrow]
for the operator....
10
votes
2
answers
446
views
Table of precedence values for all System` symbols
Has anyone created a table listing the precedences for all symbols? Also, it would be nice if there were a function that for a given precedence value or interval, returned all the symbols with that ...
5
votes
1
answer
773
views
How exactly does Postfix notation work?
I guess I've been using the Postfix notation // wrongly for some time now. I assumed it was a quick way to apply a function to ...
11
votes
4
answers
679
views
Change Operator Precedence of --> operator
I am trying to use --> operator with highest precedence
...
10
votes
2
answers
516
views
Which operators are missing from the official precedence table?
I often use the Operator Input Forms page as a reference for operator precedence as well as which (used or unused) operators exist. However, I just noticed that at least one operator is missing from ...
19
votes
4
answers
892
views
Is it important that the front-end has a built-in parser?
The Notebook interface has a parser that seems aware of all operator-precedences, allowing us to step through the expressions (rather: Box-) hierarchy with Ctrl+.
This is extremely convenient, saving ...
3
votes
2
answers
144
views
PrecedenceForm with Format
I'd like to format the output of certain operators with Infix-style formatting to have lower precedence than Times.
Let's say I ...
7
votes
1
answer
749
views
How to construct custom operators with precedence?
I need to combine data structures in operations analogous to addition, subtraction, multiplication and division (and more). I need more than one operation of each type, i.e. more than one method of ...