A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2001-March/013809.html below:

[Python-Dev] test_coercion failing

[Python-Dev] test_coercion failing [Python-Dev] test_coercion failingJack Jansen jack@oratrix.nl
Wed, 21 Mar 2001 14:30:32 +0100
It turns out that even simple things like 0j/2 return -0.0.

The culprit appears to be the statement
    r.imag = (a.imag - a.real*ratio) / denom;
in c_quot(), line 108.

The inner part is translated into a PPC multiply-subtract instruction
	fnmsub   fp0, fp1, fp31, fp0
Or, in other words, this computes "0.0 - (2.0 * 0.0)". The result of this is 
apparently -0.0. This sounds reasonable to me, or is this against IEEE754 
rules (or C99 rules?).

If this is all according to 754 rules the one puzzle remaining is why other 
754 platforms don't see the same thing. Could it be that the combined 
multiply-subtract skips a rounding step that separate multiply and subtract 
instructions would take? My floating point knowledge is pretty basic, so 
please enlighten me....
--
Jack Jansen             | ++++ stop the execution of Mumia Abu-Jamal ++++
Jack.Jansen@oratrix.com | ++++ if you agree copy these lines to your sig ++++
www.oratrix.nl/~jack    | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm 





RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4