Subject: bug#5916: closed (Re: bug#5916: XFLOAT_DATA and signed zeroes)

From: [email-masked] (GNU bug Tracking System)
Date: Sun, 16 May 2010 22:36:03 +0000

Your bug report

#5916: XFLOAT_DATA and signed zeroes

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
5916: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=5916
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#5916: XFLOAT_DATA and signed zeroes
From: Ken Raeburn <[email-masked]>
To: [email-masked]
Date: Sun, 16 May 2010 16:12:31 -0400
List-Id: <debbugs-submit.debbugs.gnu.org>

Should be fixed on trunk by yesterday's checkin:

>> revno: 100306 [merge]
>> committer: Ken Raeburn <[email-masked]>
>> branch nick: trunk
>> timestamp: Sat 2010-05-15 17:21:30 -0400
> [...]
>>  * src/lisp.h (XFLOAT_DATA): Use "0?x:x" to generate an rvalue. (bug#5916)
>>  (LISP_MAKE_RVALUE) [!USE_LISP_UNION_TYPE && !__GNUC__]: Likewise.

Subject: XFLOAT_DATA and signed zeroes
From: Vincent Lefevre <[email-masked]>
To: [email-masked]
Date: Sat, 10 Apr 2010 01:39:23 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi,

I don't know whether there's really a bug (I haven't tested the
trunk), but someone pointed a suspicious macro[*]. The change
(on 2009-08-17) is here:

http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=6f0c16bc45815337d520a9393f8de5f9c14a06d4

It is said:

  lisp.h (XFLOAT_DATA): Produce an rvalue by adding 0 to the value.

However, adding 0 has another side effect on floats: the 0 is
converted into +0.0 (due to the addition with a double), so that
a -0.0 is transformed into a +0.0.

Could someone try the following?

  (/ 1.0 (- 0.0))

The correct result should be -1.0e+INF (negative infinity).

[*] http://groupes.codes-sources.com/article-emacs-lisp-sera-iee754-fut-0x-p0-toujours-470516.aspx

-- 
Vincent Lefèvre <[email-masked]> - Web: <http://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / Arénaire project (LIP, ENS-Lyon)