K
Kedar Mhaswade
Folks,
A new user. Please be kind. I have checked
http://www.ruby-forum.com/topic/74141#new, but could not find what I was
looking for.
See following irb session:
start
irb(main):004:0* google=10**100
=>
10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
irb(main):005:0> googleplex=10**google
(irb):5: warning: in a**b, b may be too big
=> Infinity
irb(main):006:0> google.class
=> Bignum
irb(main):007:0> googleplex.class
=> Float
end
This was nice! But, I expected googleplex.class to be BigNum. Is
Infinity a Float?
Why?
Thanks in advance,
Kedar
A new user. Please be kind. I have checked
http://www.ruby-forum.com/topic/74141#new, but could not find what I was
looking for.
See following irb session:
start
irb(main):004:0* google=10**100
=>
10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
irb(main):005:0> googleplex=10**google
(irb):5: warning: in a**b, b may be too big
=> Infinity
irb(main):006:0> google.class
=> Bignum
irb(main):007:0> googleplex.class
=> Float
end
This was nice! But, I expected googleplex.class to be BigNum. Is
Infinity a Float?
Why?
Thanks in advance,
Kedar