summaryrefslogtreecommitdiff
path: root/libm/double/fltest2.c
blob: 405b81b6a35950828afc6bfeda993db80210236a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
int drand();
double exp(), frexp(), ldexp();
volatile double x, y, z;

main()
{
int i, e;

for( i=0; i<100000; i++ )
  {
    drand(&x);
    x = exp( 10.0*(x - 1.5) );
    y = frexp( x, &e );
    z = ldexp( y, e );
    if( z != x )
      abort();
  }
}