Re: What is the precedence wrt Mathematica infix operators
- To: mathgroup at smc.vnet.net
- Subject: [mg82840] Re: [mg82800] What is the precedence wrt Mathematica infix operators
- From: "Thomas Dowling" <thomasgdowling at gmail.com>
- Date: Thu, 1 Nov 2007 05:11:01 -0500 (EST)
- References: <200710311113.GAA22477@smc.vnet.net>
Hello, There is an undocumented function, Precedence, which can be useful: Precedence /@ {Plus, Minus, Times, Power, Apply, Map} gives the output: {310., 480., 400., 590., 620., 620.} I can't remember where I got this info, but it may have been in a presentation by Kris Carlson. Tom Dowling On 10/31/07, congruentialuminaire at yahoo.com <congruentialuminaire at yahoo.com> wrote: > > Hello Mathematica UG: > > I cannot find operator precedence documented anywhere. With the > operators from Fortran (in the old days) this was always clear, i.e > '/' before '-'. > > I have been reading some code in the Trott Guidebooks which has > constructions like 'Head @@ face[[i]] / order'. I can guess that Part > has precedence in this expression, but what about Apply vs. Times? > > Looking at the OutputForm shows that Apply has precendence. But,... > > - Is this documented somewhere? > - Do all Mathematica operators take precedence over arithmetic operators? > > TIA. > > Regards.. > > >