[comp.sys.sgi] Some bizarre compilation

tjh@bucrf11.bu.edu (Tim Hall) (09/22/90)

#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@bu-pub.bu.edu

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