Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

Order of priority of math operators Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
Lvu2
Posted : Monday, August 22, 2005 12:54:10 AM
Registered User
Joined: 10/7/2004
Posts: 38
If a PCF is formulated with a variety of different math operators (i.e. +, -,*, / ). And without using any parentheses. My question is: What is the order of priority as to which math operators are calculated first under the TC program?
Merci beaucoup en avance!
Doug_H
Posted : Monday, August 22, 2005 9:20:47 AM


Worden Trainer

Joined: 10/1/2004
Posts: 4,308
I don't know this for sure, but after running a bunch of very simple tests, it appears as though the order is:

Division then multiplication then subtraction then addition.

I'll run this by my colleagues, and they can pipe up to confirm this, or to let you know if they know something different.

- Doug
Teaching Online!
bustermu
Posted : Monday, August 22, 2005 10:59:51 AM
Registered User
Joined: 1/1/2005
Posts: 2,645
Luv2,

See:

RULES TO LIVE BY when creating complex PCF's:

for the order of precedence.

Thanks,
Jim Murphy
interrobang
Posted : Monday, August 22, 2005 12:20:52 PM
Registered User
Joined: 3/7/2005
Posts: 23
QUOTE (Doug_H)
I don't know this for sure, but after running a bunch of very simple tests, it appears as though the order is:

Division then multiplication then subtraction then addition.

I'll run this by my colleagues, and they can pipe up to confirm this, or to let you know if they know something different.


Doug,

I certainly hope not. Multiplication and division should have equal precedence, meaning whichever is on the left is done first. Addition and subtraction are the same. (That makes sense, considering that multiplication and division are the same thing, as are addition and subtraction.)

I don't think that it matters which order multiplication and division are done in if multiplication is on the left. (4*2)/3 = 4*(2/3). But if it's written the other way, the left-most rule applies, division is done first, and you get the correct answer: 4/2*3 = (4/2)*3 = 6. If you did the multiplication first, you'd get 2/3, which is wrong.

Rob
Lvu2
Posted : Thursday, August 25, 2005 6:49:59 PM
Registered User
Joined: 10/7/2004
Posts: 38
Doug,
Have you yet been able to run this matter by your colleagues? As you indicated above. Have you been able to confirm your original findings? Or have you now come to a different conclusion? Look forward to your response.
Merci beaucoup en avance!
Bruce_L
Posted : Thursday, August 25, 2005 7:17:16 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
The topic mentioned by bustermu has the correct information. Addition and subtraction are treated the same. Multiplication and division are treated the same but come before addition or subtraction.

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Users browsing this topic
Guest-1

Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.