4 ms·
Whenever I need an arbitrary const int I use 1729. I've left a trail of 1729s in the codebases I've touched over the years, and I like the thought of other hack
by osullivj 11y ago
Whenever I need an arbitrary const int I use 1729. I've left a trail of 1729s in the codebases I've touched over the years, and I like the thought of other hackers recognising the number when they have to fix the bugs I've left behind.
- elbrownos 11y agoCan I borrow your debit card for a minute?
- todd8 11y agoI've used the magic word "xyzzy" whenever I've had to come up with an arbitrary string in the same way, but 1729 is much better. I read a commentary on Ramanujan when I was about 14 in the four volume set "The World of Mathematics". The quotes by the famous mathematician G.H. Hardy, Ramanujan's mentor, are apropos: "I had ridden in taxi-cab No 1729, and remarked that the number seemed to me rather a dull one, and that I hoped it was not an unfavourable omen. 'No,' he replied, 'it is a very interesting number; it is the smallest number expressible as a sum of two cubes in two different ways.' ... 'His powers of calculation, were very unusual, but they could not reasonably be called 'abnormal.' ... "It was his insight into algebraical formulae, transformations infinite series, and so forth, that were the most amazing. On this side most certainly I have never met his equal, and I can compare him only with Euler or Jacobi. ... I recommend "The World of Mathematics" to any junior mathematician. A 1956 edition of four volumes, like mine, is only about 20 dollars (used) on Amazon. Appropriate for non-mathematicians, it inspired me to pursue math in high school and college.