Sha256: e6b0181f615b78b7cab3b2fe3ecb901e97114904b1c38b2aab18e92ea41ca2dc

Contents?: true

Size: 985 Bytes

Versions: 1

Compression:

Stored size: 985 Bytes

Contents

#--
# Fixnum Constants
#
# Copyright (c) 2005 Thomas Sawyer
#
# Ruby License
#
# This module is free software. You may use, modify, and/or redistribute this
# software under the same terms as Ruby.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE.
#
#
# ==========================================================================
# Revision History ::
# --------------------------------------------------------------------------
#  05.07.05  trans   * Placed in Calibre
# ==========================================================================
#++

#:title: Fixnum Constants
#
# Constants providing the numerical limitations of Fixnum class.
#
# == Synopsis
#
#   require 'mega/fixnum-constants'
#
#   puts Fixnum::MAX  #=>
#
class Fixnum
  N_BYTES = [42].pack('i').size
  N_BITS = N_BYTES * 8
  MAX = 2 ** (N_BITS - 2) - 1
  MIN = -MAX - 1
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mega-0.3.1 lib/mega/fixnum_const.rb