[gfortran] PR15206 RRSPACING wrong for zero
Paul Brook
paul@codesourcery.com
Fri May 14 00:38:00 GMT 2004
On Saturday 08 May 2004 17:28, Tobias Schlüter wrote:
> This patch fixes the RRSPACING intrinsic. It didn't return the correct
> result for a zero argument. I don't really understand how the original
> code worked, but I verified that RRSPACING(x) == x/SPACING(x) for a wide
> range of arguments. I used the condition (expn == 0 && frac == 0) to
> check for a zero argument, if this is not the correct check, please
> correct this.
I think frac==0 is a sufficient test. The result of clz(0) is undefined, so we
want to avoid that anyway
> - Tobi
>
>
> 2004-05-08 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
>
> PR fortran/15206
> * trans-intrinsic.c (gfc_conv_intrinsic_rrspacing): Fixed to
> handle zero correctly.
>
Ok, with the modified test
Paul
More information about the Fortran
mailing list