Other Number Messages Overview Numbers are objects that represent numerical values and respond to messages that compute mathematical results. The classes Integer , Double , and Float are subclasses of the class Number . The class Number defines the general protocol for all numeric classes.
Most numbers are either integers or doubles.
The Float class is used for efficiency in certain cases. All arithmetic operations between numbers return instances of the class Double . It is not meaningful to create new instances of the Number classes. Many messages defined for the class Number and its subclasses provide a way to perform standard mathematical computations. The following messages perform the basic arithmetic operations.