/*
#include
int ilogb ( double x )
int ilogbf ( float x )
int ilogbl ( long double x )
*/
#include
#include
#include
int main(char *argv[])
{
int exposant = 0;
double x = -1.509812734e200;
while ( exposant < atoi(argv[0]) )
{
exposant = ilogb( x );
printf( "The exposant of %g is %d.n", x, exposant );
if ( x < 0.0 && x * x > 1.0 )
x /= 1e34;
else
x += 1.1, x *= 2.2e34 ;
}
}