Irix 3.2 (4D) ldexp() function broken

Doug Gwyn, VLD/VMB gwyn at BRL.MIL
Fri Dec 15 00:34:13 AEST 1989


$ cat > foo.c	
#include <math.h>
#include <stdio.h>

main()	{
	printf( "%g\n", ldexp( 0.0, 0 ) );
	return 0;
	}
^D
$ cc -o foo foo.c
./foo
$ ./foo
1.11254e-308
$ # answer should be "0"; works properly on all other BRL UNIX systems
$ # I think the problem is that they're treating true-0 as a denormalized
$ # number and "rounding" it.  This is RONG.



More information about the Comp.sys.sgi mailing list