www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2005/03/24/16:57:57

X-Authentication-Warning: delorie.com: mail set sender to djgpp-workers-bounces using -f
From: Kbwms AT aol DOT com
Message-ID: <1d8.39b4d0cd.2f748f70@aol.com>
Date: Thu, 24 Mar 2005 16:47:28 EST
Subject: Change to Value for NAN
To: djgpp-workers AT delorie DOT com
MIME-Version: 1.0
X-Mailer: 8.0 for Windows sub 6033
Reply-To: djgpp-workers AT delorie DOT com

--part1_1d8.39b4d0cd.2f748f70_boundary
Content-Type: text/plain; charset="US-ASCII"
Content-Transfer-Encoding: 7bit

The value for NAN in src/libc/c99/math/nan_def.c, in 32-bit hex, is:

0x7fffffff

This value is a departure from the long-standing time-honored value used in 
src/libm/math/sf_nan.c, namely:

0x7fc00000

The test functions in test/cygnus use this latter value which agrees, except 
for sign, with the value produced by the FPU:

0xffc00000

The patch appended to this email as a postscript will change the current 
value to be consistent with the functions in libm.

KB Williams

PS

diff -c oldstuff/nan_def.c newstuff/nan_def.c
*** oldstuff/nan_def.c  Sat Oct 25 07:22:54 2003
--- newstuff/nan_def.c  Wed Mar 23 15:12:38 2005
***************
*** 1,4 ****
  /* Copyright (C) 2003 DJ Delorie, see COPYING.DJ for details */
  #include <libc/ieee.h>
  
! float_t __dj_nan = { 0x7fffff, 0xff, 0x0 };
--- 1,4 ----
  /* Copyright (C) 2003 DJ Delorie, see COPYING.DJ for details */
  #include <libc/ieee.h>
  
! float_t __dj_nan = { 0x400000, 0xff, 0x0 };

--part1_1d8.39b4d0cd.2f748f70_boundary
Content-Type: text/html; charset="US-ASCII"
Content-Transfer-Encoding: quoted-printable

<HTML><FONT FACE=3Darial,helvetica><HTML><FONT  SIZE=3D3 PTSIZE=3D12 FAMILY=
=3D"SERIF" FACE=3D"Georgia" LANG=3D"0">The value for NAN in src/libc/c99/mat=
h/nan_def.c, in 32-bit hex, is:<BR>
<BR>
0x7fffffff<BR>
<BR>
This value is a departure from the long-standing time-honored value used in=20=
src/libm/math/sf_nan.c, namely:<BR>
<BR>
0x7fc00000<BR>
<BR>
The test functions in test/cygnus use this latter value which agrees, except=
 for sign, with the value produced by the FPU:<BR>
<BR>
0xffc00000<BR>
<BR>
The patch appended to this email as a postscript will change the current val=
ue to be consistent with the functions in libm.<BR>
<BR>
KB Williams<BR>
<BR>
PS<BR>
<BR>
diff -c oldstuff/nan_def.c newstuff/nan_def.c<BR>
*** oldstuff/nan_def.c  Sat Oct 25 07:22:54 2003<BR>
--- newstuff/nan_def.c  Wed Mar 23 15:12:38 2005<BR>
***************<BR>
*** 1,4 ****<BR>
&nbsp; /* Copyright (C) 2003 DJ Delorie, see COPYING.DJ for details */<BR>
&nbsp; #include &lt;libc/ieee.h&gt;<BR>
&nbsp; <BR>
! float_t __dj_nan =3D { 0x7fffff, 0xff, 0x0 };<BR>
--- 1,4 ----<BR>
&nbsp; /* Copyright (C) 2003 DJ Delorie, see COPYING.DJ for details */<BR>
&nbsp; #include &lt;libc/ieee.h&gt;<BR>
&nbsp; <BR>
! float_t __dj_nan =3D { 0x400000, 0xff, 0x0 };<BR>
</FONT></HTML>
--part1_1d8.39b4d0cd.2f748f70_boundary--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019