• 0 Posts
  • 9 Comments
Joined 1 year ago
cake
Cake day: February 19th, 2024

help-circle



  • Except it does matter. I left some examples for another post with multiplication and division, I’ll give you some addition and subtraction to see order matter with those operations as well.

    Let’s take:
    1 + 2 - 3 + 4

    Addition first:
    (1 + 2) - (3 + 4)
    3 - 7 = -4

    Subtraction first:
    1 + (2 - 3) + 4
    1 + (-1) + 4 = 4

    Right to left:
    1 + (2 - (3 + 4))
    1 + (2 - 7)
    1 + (-5) = -4

    Left to right:
    ((1 + 2) - 3) + 4
    (3 - 3) + 4 = 4

    Edit: You can argue that, for example, the addition first could be (1 + 2) + (-3 + 4) in which case it does end up as 4, but in my opinion that’s another ambiguous case.


  • So let’s try out some different prioritization systems.

    Left to right:

    (((6 * 4) / 2) * 3) / 9
    ((24 / 2) * 3) / 9
    (12 * 3) / 9
    36 / 9 = 4
    

    Right to left:

    6 * (4 / (2 * (3 / 9)))  
    6 * (4 / (2 * 0.333...))  
    6 * (4 / 0.666...)  
    6 * 6 = 36
    

    Multiplication first:

    (6 * 4) / (2 * 3) / 9  
    24 / 6 / 9
    

    Here the path divides again, we can do the left division or right division first.

    Left first: 
    (24 / 6) / 9  
    4 / 9 = 0.444...
    
    Right side first:  
    24 / (6 / 9)  
    24 / 0.666... = 36
    

    And finally division first:

    6 * (4 / 2) * (3 / 9)  
    6 * 2 * 0.333...  
    12 * 0.333.. = 4 
    

    It’s ambiguous which one of these is correct. Hence the best method we have for “correct” is left to right.





  • Monopolies are bad enough by themselves. But with google they own such a large part of the day to day web browsing experience it’s amazing it’s not worse than it already is.

    • YouTube has documented cases of effectively throttling non-chrome browsers.
    • There is a lot of juicy user behaviour data that can be gathered directly from chrome to support Google’s AD network.
    • Google bank roll a lot of the web technologies that run websites, giving chrome an edge to implement new tech earlier and better than the competition.
    • They also own Android, and unlike windows, they don’t even give you a pop up in what browser you want to use.
    • They also don’t only control Chrome, but they are giving out the chromium (the web engine under the hood). So now they effectively control Brave, Edge, Opera, and any other browser that runs on chromium. And wouldn’t you know it, they heavily nerfed ad blockers capabilities in chromium to increase Googles ad revenue.