text: #!/usr/bin/env python
  # encoding: utf-8
  #
  # Copyright (c) 2008 Doug Hellmann All rights reserved.
  #
  """
  """
  
  __version__ = "$Id$"
  #end_pymotw_header
  
  import sys
  
  print 'Regular integer: (maxint=%s)' % sys.maxint
  try:
      i = sys.maxint * 3
      print 'No overflow for ', type(i), 'i =', i
  except OverflowError, err:
      print 'Overflowed at ', i, err
  
  print
  print 'Long integer:'
  for i in range(0, 100, 10):
      print '%2d' % i, 2L ** i
  
  print
  print 'Floating point values:'
  try:
      f = 2.0**i
      for i in range(100):
          print i, f
          f = f ** 2
  except OverflowError, err:
      print 'Overflowed after ', f, err
  
  