I had a brief look at softfloat. In principle, it should fix the
issue, but only if the FPU uses 80-bit double-extended-precision
internally. I guess the qemu FPU is still stuck at 64 bit double
internally and that does not cut it for some calculations.
Just to be sure, I re-tested the code from comment 1 and it does
work as expected with a real FPU.
Regards,
Arno
On Mon, Jan 23, 2017 at 22:20:18 CET, Thomas Huth wrote:
> Looks like your test code from comment #1 still prints out a wrong
> value, so the bug has apparently not been fixed by the FPU updates...
>
> ** Changed in: qemu
> Status: Incomplete => Triaged
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/645662
>
> Title:
> Python 3.1.2 math errors with Qemu 0.12.5
>
> Status in QEMU:
> Triaged
>
> Bug description:
> When doing the regression tests for Python 3.1.2 with Qemu 0.12.5, (Linux version 2.6.26-2-686 (Debian 2.6.26-25lenny1)),
> gcc (Debian 4.3.2-1.1) 4.3.2, Python compiled from sources within qemu,
> 3 math tests fail, apparently because the floating point unit is buggy. Qmeu was compiled from original sources
> on Debian Lenny with kernel 2.6.34.6 from kernel.org, gcc (Debian 4.3.2-1.1) 4.3.
>
> Regression testing errors:
>
> test_cmath
> test test_cmath failed -- Traceback (most recent call last):
> File "/root/tools/python3/Python-3.1.2/Lib/test/test_cmath.py", line 364, in
> self.fail(error_message)
> AssertionError: acos0034: acos(complex(-1.0000000000000002, 0.0))
> Expected: complex(3.141592653589793, -2.1073424255447014e-08)
> Received: complex(3.141592653589793, -2.1073424338879928e-08)
> Received value insufficiently close to expected value.
>
>
> test_float
> test test_float failed -- Traceback (most recent call last):
> File "/root/tools/python3/Python-3.1.2/Lib/test/test_float.py", line 479, in
> self.assertEqual(s, repr(float(s)))
> AssertionError: '8.72293771110361e+25' != '8.722937711103609e+25'
>
>
> test_math
> test test_math failed -- multiple errors occurred; run in verbose mode for deta
>
> =>
>
> runtests.sh -v test_math
>
> le01:~/tools/python3/Python-3.1.2# ./runtests.sh -v test_math
> test_math BAD
> 1 BAD
> 0 GOOD
> 0 SKIPPED
> 1 total
> le01:~/tools/python3/Python-3.1.2#
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/qemu/+bug/645662/+subscriptions
--
Arno Wagner, Dr. sc. techn., Dipl. Inform., Email: <email address hidden>
GnuPG: ID: CB5D9718 FP: 12D6 C03B 1B30 33BB 13CF B774 E35C 5FA1 CB5D 9718
----
A good decision is based on knowledge and not on numbers. -- Plato
If it's in the news, don't worry about it. The very definition of
"news" is "something that hardly ever happens." -- Bruce Schneier
I had a brief look at softfloat. In principle, it should fix the extended- precision
issue, but only if the FPU uses 80-bit double-
internally. I guess the qemu FPU is still stuck at 64 bit double
internally and that does not cut it for some calculations.
Just to be sure, I re-tested the code from comment 1 and it does
work as expected with a real FPU.
Regards,
Arno
On Mon, Jan 23, 2017 at 22:20:18 CET, Thomas Huth wrote: /bugs.launchpad .net/bugs/ 645662 tools/python3/ Python- 3.1.2/Lib/ test/test_ cmath.py" , line 364, in error_message) -1.000000000000 0002, 0.0)) 3.1415926535897 93, -2.107342425544 7014e-08) 3.1415926535897 93, -2.107342433887 9928e-08) tools/python3/ Python- 3.1.2/Lib/ test/test_ float.py" , line 479, in 61e+25' != '8.722937711103 609e+25' tools/python3/ Python- 3.1.2# ./runtests.sh -v test_math tools/python3/ Python- 3.1.2# /bugs.launchpad .net/qemu/ +bug/645662/ +subscriptions
> Looks like your test code from comment #1 still prints out a wrong
> value, so the bug has apparently not been fixed by the FPU updates...
>
> ** Changed in: qemu
> Status: Incomplete => Triaged
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https:/
>
> Title:
> Python 3.1.2 math errors with Qemu 0.12.5
>
> Status in QEMU:
> Triaged
>
> Bug description:
> When doing the regression tests for Python 3.1.2 with Qemu 0.12.5, (Linux version 2.6.26-2-686 (Debian 2.6.26-25lenny1)),
> gcc (Debian 4.3.2-1.1) 4.3.2, Python compiled from sources within qemu,
> 3 math tests fail, apparently because the floating point unit is buggy. Qmeu was compiled from original sources
> on Debian Lenny with kernel 2.6.34.6 from kernel.org, gcc (Debian 4.3.2-1.1) 4.3.
>
> Regression testing errors:
>
> test_cmath
> test test_cmath failed -- Traceback (most recent call last):
> File "/root/
> self.fail(
> AssertionError: acos0034: acos(complex(
> Expected: complex(
> Received: complex(
> Received value insufficiently close to expected value.
>
>
> test_float
> test test_float failed -- Traceback (most recent call last):
> File "/root/
> self.assertEqual(s, repr(float(s)))
> AssertionError: '8.722937711103
>
>
> test_math
> test test_math failed -- multiple errors occurred; run in verbose mode for deta
>
> =>
>
> runtests.sh -v test_math
>
> le01:~/
> test_math BAD
> 1 BAD
> 0 GOOD
> 0 SKIPPED
> 1 total
> le01:~/
>
> To manage notifications about this bug go to:
> https:/
--
Arno Wagner, Dr. sc. techn., Dipl. Inform., Email: <email address hidden>
GnuPG: ID: CB5D9718 FP: 12D6 C03B 1B30 33BB 13CF B774 E35C 5FA1 CB5D 9718
----
A good decision is based on knowledge and not on numbers. -- Plato
If it's in the news, don't worry about it. The very definition of
"news" is "something that hardly ever happens." -- Bruce Schneier