qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [Bug 645662] Re: Python 3.1.2 math errors with Qemu 0.12.5


From: Peter Maydell
Subject: [Qemu-devel] [Bug 645662] Re: Python 3.1.2 math errors with Qemu 0.12.5
Date: Wed, 29 Nov 2017 11:19:47 -0000

softfloat deals with doing the basic IEEE ops (add, subtract, multiply,
etc) at the correct 80 bit precision, but it doesn't provide
implementations of the x87's more complex operations (sin, cos, log,
etc), so QEMU is still doing those by converting from 80 bit to host
double and using the host C math library routines. Fixing this would
require writing hand-coded routines for all these operations, which is
quite a tricky bit of work. (Sadly we can't just use the bochs
implementations, because they're under the softfloat2b license which
isn't GPL2 compatible.)


** Changed in: qemu
       Status: Triaged => Confirmed

** Summary changed:

- Python 3.1.2 math errors with Qemu 0.12.5
+ QEMU x87 emulation of trig and other complex ops is only at 64-bit precision, 
not 80-bit

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/645662

Title:
  QEMU x87 emulation of trig and other complex ops is only at 64-bit
  precision, not 80-bit

Status in QEMU:
  Confirmed

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]