python 3.1 complex number data type returning wrong result from .imag() function
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python3.0 (Ubuntu) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: python3.0
the .imag() function is returning different results when operating on an object reference versus when operating on a complex data object directly.
Here is a python 3 interpreter session that shows the difference:
-------
sean01@
Python 3.1.1+ (r311:74480, Nov 2 2009, 14:49:22)
[GCC 4.4.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import math
>>> # assign a reference to a complex number
...
>>> a = 3-4j
>>> # extract the real and imaginary parts
...
>>> a.real
3.0
>>> a.imag
-4.0
>>> # This worked as expected
...
>>> # now try doing this on a complex type directly
...
>>> 3-4j.real
3.0
>>> # That looks good
...
>>> 3-4j.imag
-1.0
>>> # expected -4.0 not -1.0
...
>>>
-------
lsb_release -rd:
Description: Ubuntu 9.10
Release: 9.10
-------
apt-cache policy python3.1:
python3.1:
Installed: 3.1.1-0ubuntu5
Candidate: 3.1.1-0ubuntu5
Version table:
*** 3.1.1-0ubuntu5 0
500 http://
100 /var/lib/
3.1.1-0ubuntu4 0
500 http://
-------
apt-cache show python3.1:
Package: python3.1
Priority: optional
Section: universe/python
Installed-Size: 12148
Maintainer: Ubuntu Core Developers <email address hidden>
Original-
Architecture: i386
Version: 3.1.1-0ubuntu5
Provides: python3.
Depends: python3.1-minimal (= 3.1.1-0ubuntu5), mime-support, libbz2-1.0, libc6 (>= 2.7), libdb4.7, libncursesw5 (>= 5.6+20071006-3), libreadline6, libsqlite3-0 (>= 3.6.16)
Suggests: python3.1-doc, python3.1-profiler, binutils
Filename: pool/universe/
Size: 3577990
MD5sum: b7c6fd0414223db
SHA1: 2ce438f87e6ff9d
SHA256: 30d1bc140526d2f
Description: An interactive high-level object-oriented language (version 3.1)
Version 3.1 of the high-level, interactive object oriented language,
includes an extensive class library with lots of goodies for
network programming, system administration, sounds and graphics.
Python-Version: 3.1
Bugs: https:/
Origin: Ubuntu
Package: python3.1
Priority: optional
Section: universe/python
Installed-Size: 12148
Maintainer: Ubuntu Core Developers <email address hidden>
Original-
Architecture: i386
Version: 3.1.1-0ubuntu4
Provides: python3.
Depends: python3.1-minimal (= 3.1.1-0ubuntu4), mime-support, libbz2-1.0, libc6 (>= 2.7), libdb4.7, libncursesw5 (>= 5.6+20071006-3), libreadline6, libsqlite3-0 (>= 3.6.16)
Suggests: python3.1-doc, python3.1-profiler, binutils
Filename: pool/universe/
Size: 3577806
MD5sum: d24399d5868a7d8
SHA1: e961b52cc69a571
SHA256: 334e6e3fffb3702
Description: An interactive high-level object-oriented language (version 3.1)
Version 3.1 of the high-level, interactive object oriented language,
includes an extensive class library with lots of goodies for
network programming, system administration, sounds and graphics.
Python-Version: 3.1
Bugs: https:/
Origin: Ubuntu
Related branches
Changed in python3.0 (Ubuntu): | |
status: | New → Invalid |
Please close this bug I wrongly posted under python3.0 instead of python3.1 package.
I have opened a separate python3.1 bug # 511366
Sorry for the wrongly posted bug