prec - up - next - index


Precision is a Mix-in for concrete numerical classes with precision. Here, `precision' means the fineness of approximation of a real number, so, this module should not be included into non-subset of real, e.g. abstract numerical, complex, matrix.

Class Methods:


Creates an ojbect which is converted from number. Since it raise TypeError in default, redefine before uses. Note that a use of prec in a redefinition may causes an infinite loop.



Converts self into a object of klass. In default, prec invokes klass.induced_from(self) and returns its value. So, if klass.induced_from doesn't correspond to the class of self, it is neccessary to redefine this prec.


Returns an integer converted from self. It is equivalent to prec(Integer).


Returns a floating-point number converted from self. It is equivalent to prec(Float).

prev - up - next - index