|
-
Nov 8th, 2023, 10:41 AM
#15
Re: Expression Calculator
 Originally Posted by Shaggy Hiker
I feel like I learned that multiplication and division have equal precedence, but that I then learned about he My Dear Aunt Sally precedence only recently...and I feel like I learned it here, or at least from some programming resource. Either way, I think making it explicit what you intend is probably superior to letting people decide for themselves.
I was taught PEMDAS with multiplication and division having same precedence, same for addition and subtraction. From my reading PEMDAS is a North America thing. PEJMDAS seems prevalent in other places.
I documented 6/2(1+2) = 1 as well as -9^2 = 81. Users of the library will know and can do as they will.
As others have pointed out explicit grouping removes all doubt.
I'm ok with the move.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|