Some bizarre compilation

Tim Hall tjh at bucrf11.bu.edu
Sat Sep 22 09:19:24 AEST 1990


#include <stdio.h>
#include <math.h>

main( )
{
	float foo;

	foo = HUGE;
	if ( foo == HUGE )
		printf( "foo is huge\n" );
	else
		printf( "foo isn't huge\n" );

}

This compiled on a 4D/240 running 3.2 works fine and prints out
"foo is huge".  This compiled on a 3.3.1 PI does *not* work fine
and prints out "foo isn't huge".  As commented in math.h HUGE is
the maximum *float* value.

The workaround is obvious, this is more of a bitch and a rant.

--
-Tim Hall
tjh at bu-pub.bu.edu

The night is filled with the cries of dispossessed children in search
of paradise.  -Dead Can Dance



More information about the Comp.sys.sgi mailing list