From nashjc at uottawa.ca  Sat Aug  8 16:39:04 2009
From: nashjc at uottawa.ca (Prof. John C Nash)
Date: Sat, 08 Aug 2009 10:39:04 -0400
Subject: [Rd] identical(0, -0)
In-Reply-To: <mailman.23.1249725606.24224.r-devel@r-project.org>
References: <mailman.23.1249725606.24224.r-devel@r-project.org>
Message-ID: <4A7D8E08.2070300@uottawa.ca>

I'll save space and not include previous messages.

My 2 cents: At the very least the documentation needs a fix. If it is 
easy to do, then Ted Harding's suggestion of a switch (default OFF) to 
check for sign difference would be sensible.

I would urge inclusion in the documentation of the +0, -0 example(s) if 
there is NOT a way in R to distinguish these. There are occasions where 
it is useful to be able to detect things like this (and NaN and Inf and 
-Inf etc.). They are usually not of interest to users, but sometimes are 
needed for developers to check edge effects. For those cases it may be 
time to consider a package FPIEEE754 or some similar name to allow 
testing and possibly setting of flags for some of the fancier features. 
Likely used by just a few of us in extreme situations.  Unfortunately, 
some of the nice exception handling that was suggested in the standard 
is apparently rarely implemented in compilers.

For info, I was actually a voting member of IEEE 754 because I found a 
nice "feature" in the IBM Fortran G arithmetic, though I never sat in on 
any of the meetings.

JN



[Rd] identical(0, -0)
Prof. John C Nash