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]

Re: [PATCH/gfortran] Chop bits of subnormal numbers


Steve Kargl wrote:
> I've updated the patch to chop the bits on the absolute
> value, and then set the sign if need be.
> 
> Bubblestrapped and reg. tested onn i386-*-freebsd.
> 
> OK for mainline?

This is ok, but I'd prefer if a testcase went along with it.  Something like
 if (tiny(x)/2. /= tiny(x)/2. - (nearest(tiny(x),1.) - tiny(x)))/2.) &
     call abort
should do the trick.  (The idea is to change the digit that gets chopped off
when we go from normalized to subnormal numbers, I'm not sure if I got it
right, though).  I'll have a go at fixing NEAREST for subnormals now.

- Tobi


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