On 4/12/2010 8:29 PM, ольга крыжановская wrote:
ksh93 is a POSIX conform shell, this includes C99 conform arithmetic
expressions in shell arithmetic expressions, i.e. (( expression )).
The C99 standard and POSIX require that NaN has a sign (and a payload,
but this is not this topic). This is not a bug, this is an intentional
feature which becomes useful to detect from which side (positive,
negative or above, below) the NaN was approached (e.g. copysign()
should still work on NaN values).
Cleaning the sign bit would be a bug and the test suite would choke on
it, there is even an explicit test in the shell test suite which
verifies whether negative NaN is functional.
I don't know whether the difference between SPARC and i386 is a bug in
i386 or the standard undefined. This should be investigated by the
compiler team.
I forwarded this to one of our math library experts for his comments. I
will let you know when I hear back.
Thanks,
George
Olga
On Mon, Apr 12, 2010 at 3:45 PM, Keith Bierman
<[email protected]> wrote:
Any reason the Solaris ksh port doesn't clear the sign bit before calling
libc? I presume that changing the ksh source globally would take the authors
cooperation, but would be ideal
[email protected] | [email protected]
Sent from my iPod
On Apr 12, 2010, at 12:52 AM, "Zhishun A. Liu" <[email protected]> wrote:
Please see my posting at
http://opensolaris.org/jive/thread.jspa?threadID=127167#473647
Bottom line: Intel hardware isn't broken; NaN *display* has nothing to do
with the compiler used.
--
This message posted from opensolaris.org
_______________________________________________
tools-compilers mailing list
[email protected]
________________________________
The information contained in this transmission may be confidential. Any
disclosure, copying, or further distribution of confidential information is
not permitted unless such privilege is explicitly granted in writing by
Quantum. Quantum reserves the right to have electronic communications,
including email and attachments, sent across its networks filtered through
anti virus and spam software programs and retain such messages in order to
comply with applicable data security and retention requirements. Quantum is
not responsible for the proper and complete transmission of the substance of
this communication or for any delay in its receipt.
_______________________________________________
tools-compilers mailing list
[email protected]
_______________________________________________
tools-compilers mailing list
[email protected]