Yurttas/PL/SL/python/docs/core-python-programming/doc/20/ref/imaginary.html

From ZCubes Wiki
Revision as of 20:10, 7 November 2013 by MassBot1 (talk | contribs) (Created page with "<div class="navigation"> {| width="100%" cellspacing="2" align="center" | yurttas/PL/SL/python/docs/core-python-programming/doc/20/ref/floating.html|[[Image:yurttas_PL_...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


2.4.6 Imaginary literals

Imaginary literals are described by the following lexical definitions:

imagnumber:     (floatnumber | intpart) ("j"|"J")

An imaginary literal yields a complex number with a real part of 0.0. Complex numbers are represented as a pair of floating point numbers and have the same restrictions on their range. To create a complex number with a nonzero real part, add a floating point number to it, e.g., (3+4j). Some examples of imaginary literals:

3.14j   10.j    10j     .001j   1e100j  3.14e-10j

See About this document... for information on suggesting changes.