unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#5916: XFLOAT_DATA and signed zeroes
@ 2010-04-09 23:39 Vincent Lefevre
  2010-04-10 15:20 ` Stefan Monnier
  2010-05-16 18:58 ` Glenn Morris
  0 siblings, 2 replies; 8+ messages in thread
From: Vincent Lefevre @ 2010-04-09 23:39 UTC (permalink / raw)
  To: 5916

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 <vincent@vinc17.net> - 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)







^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2010-05-16 20:12 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-09 23:39 bug#5916: XFLOAT_DATA and signed zeroes Vincent Lefevre
2010-04-10 15:20 ` Stefan Monnier
2010-04-10 16:05   ` Andreas Schwab
2010-04-10 16:43     ` Vincent Lefevre
2010-04-10 17:25       ` Andreas Schwab
2010-05-16 18:58 ` Glenn Morris
2010-05-16 20:11   ` Ken Raeburn
2010-05-16 20:12   ` Ken Raeburn

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).