Hacker News new | ask | show | jobs
by yread 33 days ago
You're absolutely correct, the base is not specified. That's the joke. 1-1=0 would not be a joke. Perhaps it's better not to think of it as a joke. When mathematician reads what seems like nonsense, questions like "hmm is there a base where this would be true?" and "which bases is this true in?" pop up
1 comments

I'm a mathematician, and my reaction here is somewhat different.
So what's a good math joke?

I like this one: Young mathematician goes to first grade and the teacher asks who knows what is 1+2. She stands up and says "I don't know what is it, but I do know that it's the same as 2+1 as addition is commutative in the monoid of natural numbers"

People said the same thing about a joke Douglas Adams made in his Hitch Hikers series -- that the (corrupted) Ultimate Question to which the answer was 42 ("what do you get if you multiply six by nine?") was a maths joke because 6x9=42 in base 13. Douglas Adams said this was nonsense.
Reminds me of one of my favorite joke programs.

  #include <stdio.h>

  #define SIX 1+5
  #define NINE 8+1
  
  int main() {
      printf("%d\n", SIX * NINE);
  }
Didn't Linus #define THREE as something else in Linux source code.

Was that the 2-3-4 tree? Can't seem to find it now.

It was from some filesystem code. https://news.ycombinator.com/item?id=7296497

  unsigned three = 1;
  unsigned five = 5;
  unsigned seven = 7;
These actually get changed through pointers to consecutive powers of 3, 5 and 7 respectively. `three` is initialized to the 0th power of 3, but because only a single 1 is needed by the algorithm, `five` and `seven` are initialized to the 1st powers instead.
Ah right. Thank you so much. At least I wasn't hallucinating.
And by accident, 42 happens to be the first base after her multiplication gives the answer 19 here (when 20 would be expected), although it would produce an answer of "tenteen", not twenty.