Kaydet (Commit) aa5dba02 authored tarafından Fred Drake's avatar Fred Drake

Add index entry for reference to the math module.

üst d327a8dd
...@@ -82,10 +82,10 @@ The mathematical constant \emph{e}, as a real. ...@@ -82,10 +82,10 @@ The mathematical constant \emph{e}, as a real.
\end{datadesc} \end{datadesc}
Note that the selection of functions is similar, but not identical, to Note that the selection of functions is similar, but not identical, to
that in module \code{math}. The reason for having two modules is, that in module \code{math}\refbimodindex{math}. The reason for having
that some users aren't interested in complex numbers, and perhaps two modules is, that some users aren't interested in complex numbers,
don't even know what they are. They would rather have \code{math.sqrt(-1)} and perhaps don't even know what they are. They would rather have
raise an exception than return a complex number. Also note that the \code{math.sqrt(-1)} raise an exception than return a complex number.
functions defined in \code{cmath} always return a complex number, even Also note that the functions defined in \code{cmath} always return a
if the answer can be expressed as a real number (in which case the complex number, even if the answer can be expressed as a real number
complex number has an imaginary part of zero). (in which case the complex number has an imaginary part of zero).
...@@ -82,10 +82,10 @@ The mathematical constant \emph{e}, as a real. ...@@ -82,10 +82,10 @@ The mathematical constant \emph{e}, as a real.
\end{datadesc} \end{datadesc}
Note that the selection of functions is similar, but not identical, to Note that the selection of functions is similar, but not identical, to
that in module \code{math}. The reason for having two modules is, that in module \code{math}\refbimodindex{math}. The reason for having
that some users aren't interested in complex numbers, and perhaps two modules is, that some users aren't interested in complex numbers,
don't even know what they are. They would rather have \code{math.sqrt(-1)} and perhaps don't even know what they are. They would rather have
raise an exception than return a complex number. Also note that the \code{math.sqrt(-1)} raise an exception than return a complex number.
functions defined in \code{cmath} always return a complex number, even Also note that the functions defined in \code{cmath} always return a
if the answer can be expressed as a real number (in which case the complex number, even if the answer can be expressed as a real number
complex number has an imaginary part of zero). (in which case the complex number has an imaginary part of zero).
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment