Ruby/Number/Bignum class
Материал из Wiki.crossplatform.ru
Версия от 17:10, 26 мая 2010; (Обсуждение)
Declare the Variables to Store the Details
a = 5 puts a.type a = 5.888 puts a.type a = 9999999999 puts a.type
Large Numbers
rice_on_square = 1 64.times do |square| puts "On square #{square + 1} are #{rice_on_square} grain(s)" rice_on_square *= 2 end
What is the start of Bignum
puts 1073741823.class puts 1073741824.class