This baby throws “Errno::EBADF: Bad file descriptor”, which I think
deserves a medal for being the least intuitive error message of 2008!

Works fine for me:

$ irb
irb(main):001:0> 567
=> 73643396061195573182045442760389697209119043099561473825102644208480
80271451222449204242010655986286553096951684440491235491489097071221600
73189280314561194164500176158310362022388644790243471934093460794441233
52773742517692136546608518658769275630499890833988104996453386858963527
…
and so on

this on my locally compiled irb 0.9.5(05/04/13) on debian

And now, for the real question…

Why is this being evaluated as 5**(6**7), when for instance 9/9/9 is
being evaluated normally (9/9)/9=0, instead of 9/(9/9)=9?

What makes you think either order is the “normal” one?

Why is this being evaluated as 5**(6**7), when for instance 9/9/9 is
being evaluated normally (9/9)/9=0, instead of 9/(9/9)=9?
Exponentiation has reverse precedence as compared to division,
multiplication, etc.

Why is this being evaluated as 5**(6**7), when for instance 9/9/9 is
being evaluated normally (9/9)/9=0, instead of 9/(9/9)=9?

Ruby follows the actual mathematical usage, where a^b^c (imagine it
written in tower form) is a^(b^c). I guess this is because (a^b)^c =
a^(bc), so a^(b^c) was the case that needed the compact notation

On Wed, Aug 20, 2008 at 11:38 AM, Sandor
Szücs[email protected] wrote:

Really?
With 1.9 and 1.8.7, I get a number that starts with the same and ends with
625. I hope it’s just a typo.
If I remember modulo calculations from school correctly it surely is a
typo
R.