On Fri, 2 Feb 2001, Mike Wilson wrote:

[about 1020939**28329282]

> It struck me as pretty cool that it doesn't limit the user, seeing
> perl basically give up was a shock though.  I'm not completely sure
> which is more comforting to me. I guess I'll just need to make sure I
> check number sizes before doing maths ;)

Ruby automatically does the Fixnum -> Bignum stuff for you, with perl you
need to be explicit e.g.

  DB<1> use Math::BigInt

  DB<2> print 1020939 ** 28329282
inf
  DB<3> print 500 ** 500
inf
  DB<4> print Math::BigInt->new(500) ** Math::BigInt->new(500)
+305493636349960468205...[snip]

Ruby's behaviour is certainly more convenient, as long as you know what
you're doing.

Mike

-- 
mike / stok.co.uk                    |           The "`Stok' disclaimers" apply.
http://www.stok.co.uk/~mike/       |
GPG PGP Key 1024D/059913DA         | Fingerprint      0570 71CD 6790 7C28 3D60
stok / colltech.com (CT - work)      |                  75D2 9EC4 C1C0 0599 13DA