Commit bc622fae by Bernd Schmidt Committed by Bernd Schmidt

Four new tests

From-SVN: r30759
parent 8571e492
1999-12-02 Bernd Schmidt <bernds@cygnus.co.uk>
* compile/991202-1.c: New test.
* execute/991202-1.c: New test.
* execute/991202-2.c: New test.
* execute/991202-3.c: New test.
1999-11-27 Bernd Schmidt <bernds@cygnus.co.uk> 1999-11-27 Bernd Schmidt <bernds@cygnus.co.uk>
* compile/991127-1.c: New test. * compile/991127-1.c: New test.
......
extern float A[], B[];
extern float MAXNUMF;
float chbevlf(float, float *, int);
float expf(float), i1f(float), logf(float), sqrtf(float);
float k1f(float xx)
{
float x, y;
x = xx;
if( x <= 2.0 )
{
y = x * x - 2.0;
y = logf( 0.5f * x ) * i1f(x) + chbevlf( y, A, 7 ) / x;
return( y );
}
return( expf(-x) * chbevlf( (float)(8.0/x - 2.0), B, 10 ) / sqrtf(x) );
}
int x, y;
int
main()
{
x = 2;
y = x;
do
{
x = y;
y = 2 * y;
}
while ( ! ((y - x) >= 20));
exit (0);
}
int
f1 ()
{
unsigned long x, y = 1;
x = ((y * 8192) - 216) % 16;
return x;
}
int
main ()
{
if (f1 () != 8)
abort ();
exit (0);
}
unsigned int f (unsigned int a)
{
return a * 65536 / 8;
}
unsigned int g (unsigned int a)
{
return a * 65536;
}
unsigned int h (unsigned int a)
{
return a / 8;
}
int main ()
{
if (f (65536) != h (g (65536)))
abort ();
exit (0);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment