"Fossies" - the Fresh Open Source Software Archive

Member "NZMATH-1.2.0/nzmath/plugin/math/__init__.py" (19 Nov 2012, 998 Bytes) of package /linux/misc/old/NZMATH-1.2.0.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Python source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. For more information about "__init__.py" see the Fossies "Dox" file reference documentation.

    1 """
    2 math plug-in modules.
    3 
    4 plug-in for float, complex data types and math/cmath functions.
    5 
    6 Choose the implementation among provided plug-ins through config.
    7 
    8 API
    9 ===
   10 
   11 All math plug-ins provides the following constants: MATHMODULE,
   12 CMATHMODULE, FLOATTYPE and COMPLEXTYPE.
   13 
   14 MATHMODULE
   15 ----------
   16 
   17 A module provides at least the same functions in 'math' standard
   18 library of Python 2.5.  All functions accept FLOATTYPE (see below).
   19 
   20 CMATHMODULE
   21 -----------
   22 
   23 A module provides at least the same functions in 'cmath' standard
   24 library of Python 2.5.  All functions accept COMPLEXTYPE (see below).
   25 
   26 FLOATTYPE
   27 ---------
   28 
   29 A data type represents an approximation of real number.
   30 
   31 COMPLEXTYPE
   32 -----------
   33 
   34 A data type represents an approximation of complex number.  Typically,
   35 real and imaginary (imag) parts are represented with FLOATTYPE.
   36 
   37 CHECK_REAL_OR_COMPLEX
   38 ---------------------
   39 
   40 A function return 1 if testee is a real number, 0 if complex.  If
   41 testee is not a complex number, raise an exception.
   42 """