• @[email protected]
    link
    fedilink
    English
    406 months ago

    Actually we don’t know whether 2+3 equals to 3+2 without seeing the definition of the + operator

    • FuglyDuck
      link
      English
      37
      edit-2
      6 months ago

      If

      1 x 0 = 0

      And

      2 x 0 = 0

      Then 1 = 2.

      And this folks is why you don’t hire “math teachers” because he was a successful football coach. It took him way too long to realize this is why we don’t divide by zero, (more than a week, actually.)

        • @[email protected]OP
          link
          fedilink
          English
          5
          edit-2
          6 months ago

          Or signed integers because overflow is undefined. It could do the left-hand computation in two’s complement and the right hand in sign-magnitude, leading to different results. Or, as it’s undefined, it could brew you some coffee and serve it with an aspirin.

      • @Viking_Hippie
        link
        English
        26 months ago

        That’s decidedly unfun and headhurty for those of us less mathemstically inclined. Also so deep into the theoretical weeds that I’m not sure that “fact” applies…

        • @[email protected]OP
          link
          fedilink
          English
          6
          edit-2
          6 months ago

          One night I dreamt about the new C standard. It was a tome of ten thousand pages, in dense, tiny, font, three columns of text on each page, and it was all headings and sub-headings interspersed with nothing but either “undefined” or “implementation-defined”.

      • zea
        link
        fedilink
        English
        26 months ago

        C doesn’t even guarantee a == a