[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Octave and Please Excuse My Dear Aunt Sally
From: |
clustro |
Subject: |
Octave and Please Excuse My Dear Aunt Sally |
Date: |
Fri, 27 May 2011 11:04:47 -0700 (PDT) |
Hello everyone,
I tried doing this operation as a test:
3*4/2*2
Following PEMDAS (Please Excuse My Dear Aunt Sally), I should get:
3*4 = 12
2*2 = 4
12/4 = 3
But instead, I get 12, because apparently octave is doing 4/2 first, and
then multiplication.
What on earth is octave doing? Apparently, I am not the only person who
thought Octave used PEMDAS (http://tinyurl.com/3rfsk9g, last page). What
order of operations is octave using?
This might seem like such a slight matter but there is a bunch of code I
have to go back and fix now because of this, and I just want to make sure I
know the correct priority of the operations to save myself having to do it
all over again.
Thanks,
-Brad Ridder
--
View this message in context:
http://octave.1599824.n4.nabble.com/Octave-and-Please-Excuse-My-Dear-Aunt-Sally-tp3555977p3555977.html
Sent from the Octave - General mailing list archive at Nabble.com.
- Octave and Please Excuse My Dear Aunt Sally,
clustro <=