On Jan 8, 2012, at 19:13, John Gilmore wrote: > | What is x'8000 0000' interpreted as HFP? > > It does not occur as the result of an in-line or library-subroutine > operation, both of which are coerced to be x'0000_0000', a 2C > poositive zero. > > What happens when this value is made to figure in an arithmetic > operation using EQUIVALENCE or one of the pointer-mediated operations > now supported in many FORTRANs I don't really know, but I will conduct > some experiments and report on their results tomorrow. > >From (IBM's) C compiler:
float X = 0; int I; * (unsigned char *) & X = 128; printf( "%f %f\n", X, X + 0.0 ); -- prints 0.000000 0.000000 printf( "%s\n", X ? "true" : "false" ); -- prints false printf( "%s\n", ( X==0.0 ) ? "zero" : "nonzero" ); -- prints zero -- gil
