Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
As in "we agree that you see 6 / 2(1 + 2) == 9 and I see 6 / 2(1 + 2) == 1, so we'll not talk about it."
The correct answer is actually 9, btw. -
Me: a == x
You: a == y
Assuming x != y
Agree to disagree would be
(Me && You) == null
Expanded
( (a == x) && (a == y) && (x != y) == null
If you don't pass the question on your logic homework, let me know. -
devios157017y@RiderExMachina Actually the correct answer is that you are combining two different mathematical notations and the question is invalid.
-
devios157017yAs for the OP's question, I would say it's something like this:
assert(userA.agreesWith(userB) == userB.agreesWith(userA)) -
@devios1 No. The rule is that brackets are dealt with first.
So 6 / 2 * 3
Then left to right.
3 * 3
Which is 9. -
@Wildgoose which rule is this? Cuz in math the 2 gets distributed into all of the parentheses first, no?
-
devios157017y@Wildgoose BEDMAS is not a law, it's a mnemonic device.
In proper mathematical notation, 2 (1 + 2) does not just represent times, it's a term and has higher precedence than the division that precedes it.
In other words, you can't split the term up into denominator (2) and a numerator (1 + 2) as it would change what's represented.
For example, consider if (1 + 2) was replaced with 'a'. It then becomes:
6 / 2a
…which is equivalent to 6 ➗(2 ✖️a), or 6 ➗(2 ✖️(1 ➕2)) once you substitute the 1 + 2 back in. -
@devios1 Sorry, yes, you're correct. And I already knew that - but that's what happens when you post when on holiday in Prague after drinking lots of excellent Czech beer. 🤓
I am so confused with this sentence
"Let's agree to disagree"
Is it a == or != or !== or ===
undefined