Integer Limits plugin

Plugin details

integer_limits adds constants for determining the minimum and maximum values of integers.

Websitehttp://wiki.pluginaweek.org/Integer_limits Repositoryhttp://svn.pluginaweek.org/trunk/integer_limits Author Aaron Pfeifer Tags integer LicenseMIT

Documentation

Install the plugin:
ruby script/plugin install http://svn.pluginaweek.org/trunk/integer_limits

Description
============

Unfortunately, Ruby only provides constants for the minimum and maximum values of floats. This plugins adds additional constants for Integer classes, specifically Fixnum and Bignum, that gives you the ability to find the minimum and maximum values.

Usage
========

Fixnum
-----------

On 32-bit systems:

  >> Fixnum::MIN
  => -1073741824
  >> Fixnum::MAX
  => 1073741823


On 64-bit systems:

  >> Integer::MIN
  => -4611686018427387904
  >> Integer::MAX
  => 4611686018427387903


Bignum
-----------

  >> Bignum::MIN
  => -Infinity
  >> Bignum::MAX
  => Infinity

Further Documentation

There is currently no advanced documentation for this plugin.

New documentation

Edit plugin | Back in time (1 older version) | Last edited by: obrie572, 6 months ago