Squeak Class Documentation category index | class index  
 
LargeNegativeInteger
  category: Kernel-Numbers
  superclass: LargePositiveInteger
  subclasses:

Just like LargePositiveInteger, but represents a negative number.

instance methods
  arithmetic
  abs
negated

  bit manipulation
  highBit

  converting
  normalize

  printing
 

  testing
  negative
positive
sign
strictlyPositive

class methods
  as yet unclassified
  initializedInstance

instance methods
  arithmetic top  
 

abs

Answer a Number that is the absolute value (positive magnitude) of the
receiver.


 

negated

Answer a Number that is the negation of the receiver.


  bit manipulation top  
 

highBit

Answer the index of the high order bit of the receiver, or zero if the
receiver is zero. Raise an error if the receiver is negative, since
negative integers are defined to have an infinite number of leading 1's
in 2's-complement arithmetic. Use >>highBitOfMagnitude if you want to
get the highest bit of the magnitude.


  converting top  
 

normalize

Check for leading zeroes and return shortened copy if so


  printing top  

  testing top  
 

negative

Answer whether the receiver is mathematically negative.


 

positive

Answer whether the receiver is positive or equal to 0. (ST-80 protocol).
See also strictlyPositive


 

sign

Optimization. Answer -1 since receiver is less than 0.


 

strictlyPositive

Answer whether the receiver is mathematically positive.


class methods
  as yet unclassified top  
 

initializedInstance

Answer an instance of the receiver which in some sense is initialized. In the case of Morphs, this will yield an instance that can be attached to the Hand after having received the same kind of basic initialization that would be obtained from an instance chosen from the 'new morph' menu. Return nil if the receiver is reluctant for some reason to return such a thing