[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
3 Ordinary number types
CLN implements the following class hierarchy:
Number cl_number <cln/number.h> | | Real or complex number cl_N <cln/complex.h> | | Real number cl_R <cln/real.h> | +-------------------+-------------------+ | | Rational number Floating-point number cl_RA cl_F <cln/rational.h> <cln/float.h> | | | +--------------+--------------+--------------+ Integer | | | | cl_I Short-Float Single-Float Double-Float Long-Float <cln/integer.h> cl_SF cl_FF cl_DF cl_LF <cln/sfloat.h> <cln/ffloat.h> <cln/dfloat.h> <cln/lfloat.h>
The base class cl_number
is an abstract base class.
It is not useful to declare a variable of this type except if you want
to completely disable compile-time type checking and use run-time type
checking instead.
The class cl_N
comprises real and complex numbers. There is
no special class for complex numbers since complex numbers with imaginary
part 0
are automatically converted to real numbers.
The class cl_R
comprises real numbers of different kinds. It is an
abstract class.
The class cl_RA
comprises exact real numbers: rational numbers, including
integers. There is no special class for non-integral rational numbers
since rational numbers with denominator 1
are automatically converted
to integers.
The class cl_F
implements floating-point approximations to real numbers.
It is an abstract class.
3.1 Exact numbers | ||
3.2 Floating-point numbers | ||
3.3 Complex numbers | ||
3.4 Conversions |
[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This document was generated on August 27, 2013 using texi2html 5.0.