This is the mail archive of the
mailing list for the GCC project.
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.) &
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.