1. Home
  2. Computing & Technology
  3. Ruby

Ruby's Bignum Library
About Computers and Math

By , About.com Guide

Computers are quite good at math or, more precisely, at arithmetic. In fact, technically, that's all a computer can do. However, the numbers computers typically work with are quite limited. On a typical computer, an integer number is represented by a 32-bit binary number. A 32-bit integer can only represent the numbers from about negative 2 billion to positive 2 billion.

While that's quite a big range, and will probably encompass most uses of integers you can think of, it's still not quite good enough for all cases. What if you're calculating the mass of a very large star based on astronomical observations? You're definitely going to need something that can handle larger numbers.

Explore Ruby
By Category
About.com Special Features

Holiday Central

What to eat, where to go, fun things to do and how to save money on the perfect gifts. More >

Family Tech Center

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

  1. Home
  2. Computing & Technology
  3. Ruby
  4. Advanced Ruby
  5. Ruby's Bignum Library

©2009 About.com, a part of The New York Times Company.

All rights reserved.