This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

new real.c implementation


I'm going to be out of town for the weekend, so I'm not going to check
this in this evening.  But I plan to do so on Monday.  That should leave
the weekend for someone to beat on it some more.  ;-)

The patch has been tested:

  On i686 and alphaev56 with bootstrap, check, and Paranoia, all of
  which came out clean.  That fairly well takes care of IEEE.  Err,
  now that I think again, suppose I didn't check a 128-bit ieee target.
  A sparc64 run should verify that, which I'll start this evening.

  For VAX, I370, and C4X, I compared the output of 

	float f[] = { 0.0f, -0.0f, 1.0f, -1.0f, 2.0f, 3.0f, 1.0f/3.0f,
		      __FLT_MIN__, __FLT_MAX__, __FLT_DENORM_MIN__
	};

	double d[] = { 0.0, -0.0, 1.0, -1.0, 2.0, 3.0, 1.0/3.0,
		      __DBL_MIN__, __DBL_MAX__, __DBL_DENORM_MIN__
	};

	long double l[] = { 0.0L, -0.0L, 1.0L, -1.0L, 2.0L, 3.0L, 1.0L/3.0L,
		            __LDBL_MIN__, __LDBL_MAX__, __LDBL_DENORM_MIN__
	};

  against the old real.c implementation.  VAX output is 100% identical.
  I370 output is identical except for DBL_MIN, which is now correct
  instead of zero.  C4X output varies in its handling of -0 and DBL_MIN;
  I believe the old results to be in error, but it'd be nice if someone
  could confim that.

  (Oh, __FOO_DENORM_MIN__ comes from another patch I posted for libstdc++
  last week.  The failure of the old real.c to handle this value on x86
  is what caused me to run down this bunny trail in the first place.)

I include real.[ch] directly instead of via diffs, since it's about
a third the size.



r~

Attachment: d-real-0913.cl
Description: Text document

Attachment: real.c
Description: Text document

Attachment: real.h
Description: Text document

Attachment: d-real-0913
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]