[Info-vax] gnulib test-fmal-ieee failure help needed.

Craig A. Berry craigberry at nospam.mac.com
Sat Jul 22 23:09:00 EDT 2017


On 7/22/17 8:54 PM, John E. Malmberg wrote:
> The gnulib test-fmal-ieee is failing for the gnulib provided fmal routine.
> 
> Actually a lot of the IEEE tests are failing.
> 
> My compiler command line on OpenVMS 8.4 is:
> 
> CC/STANDARD=(RELAXED)/ACCEPT=(NOVAXC,RESTR,C99)-
>    /LIST/SHOW=(EXPAN,INCLU)/NAMES=(AS_IS,SHORT)-
>    /MAIN=POSIX_EXIT-
>    /FLOAT=IEEE/IEEE_MODE=DENORM_RESULTS-
>    /NESTED=NONE-
>    /PREFIX=EXCEPT=(STRTOIMAX,STRTOUMAX,ISWBLANK,ISBLANK)-
>    /WARN=(DISABLE=QUESTCOMPARE)-
>    /DEBUG/NOOPTIMIZE/DEB=ALL/NOOPT-
>    /DEF=-(HAVE_CONFIG_H,EXEEXT="",EXEEXT="",NO_XMALLOC,EXEEXT="",-
>           GNULIB_STRICT_CHECKING=1,_POSIX_EXIT,_USE_STD_STAT,-
>        _  _USE_STD_IOSTREAM)-
>     /INC=(./,../)/OBJECT=SYS$DISK:[]fmal.o SYS$DISK:[]fmal.c
> 
> The floating variables involved are declared double.
> 
> The input to the failed call is:
> 
>   fmal(Infinity, 2.0L, -Infinity) and the result is expected to be NaN.
> 
> Is there some other compile settings that I should be using to be more 
> compatible with GNULIB's expectations for IEEE math?

fmal is for long doubles, so passing doubles to it is unlikely to work.
For example, you probably want LDBL_INFINITY instead of Infinity.
Possibly related is that none of the IEEE test macros (isnan, isinf,
etc.) in math.h on VMS works for floats or long doubles -- they only
work for doubles. Which is a bug. We have some workarounds in Perl for
some of it.




More information about the Info-vax mailing list