(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
|
[[yurttas/PL/SL/python/docs/core-python-programming/doc/20/ref/floating.html| ]]
|
[[yurttas/PL/SL/python/docs/core-python-programming/doc/20/ref/literals.html| ]]
|
[[yurttas/PL/SL/python/docs/core-python-programming/doc/20/ref/operators.html| ]]
|
Python Reference Manual
|
[[yurttas/PL/SL/python/docs/core-python-programming/doc/20/ref/contents.html| ]]
|
|
[[yurttas/PL/SL/python/docs/core-python-programming/doc/20/ref/genindex.html| ]]
|
Previous: 2.4.5 Floating point literals Up: 2.4 Literals Next: 2.5 Operators
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
|
[[yurttas/PL/SL/python/docs/core-python-programming/doc/20/ref/floating.html| ]]
|
[[yurttas/PL/SL/python/docs/core-python-programming/doc/20/ref/literals.html| ]]
|
[[yurttas/PL/SL/python/docs/core-python-programming/doc/20/ref/operators.html| ]]
|
Python Reference Manual
|
[[yurttas/PL/SL/python/docs/core-python-programming/doc/20/ref/contents.html| ]]
|
|
[[yurttas/PL/SL/python/docs/core-python-programming/doc/20/ref/genindex.html| ]]
|
Previous: 2.4.5 Floating point literals Up: 2.4 Literals Next: 2.5 Operators
See About this document... for information on suggesting changes.