Infinity
A full featured Infinity class, supporting signed direction. Inifinty is a multiton based on direction The constant INFINITY is provided as the common case with direction=+1 (positive).
Besides being an class, these four constants are preset:
NaN Inf PosInf NegInf
These four constants a built from two other basic constants:
UNDEFINED INFINITY
In physical memory there are actually only three objects, namely three instances of InfinityClass, one for NaN, PosInf and NegInf, respectively.
Copying
Copyright (c) 2004 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.
Authors
- Thomas Sawyer
Todo
- Could @direction values greater than 1 support Aleph?
- facets/multiton