home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Simtel MSDOS 1992 September
/
Simtel20_Sept92.cdr
/
msdos
/
pctech
/
feb88.arc
/
AUTO6.C
< prev
next >
Wrap
Text File
|
1985-09-30
|
665b
|
37 lines
/* auto6.c - float math library benchmark programs */
#include "stdio.h"
float a1[4] = { 0.1 , 0.5 , 1.1 , 3.1 } ;
float a2[8] = { 2.0 , 5.2 , 16.0 , 111.1 ,
1000.0 , 0.1 , 0.01 , 0.001 } ;
float y[4] ;
double exp() , log() , sin() , tan() ;
int explog()
{
int i ;
for(i=0; i< 100 ; i++ )
{ y[i % 4] = exp( a1[i % 4] )
+ log( a2[i % 8] ) ;
}
}
float b1[4] = { 0.1 , 0.7 , 1.4 , 2.9 } ;
float b2[8] = { 0.1 , 0.7 , 1.4 , 2.9 ,
- 0.1 , - 0.7 , - 1.4 , - 2.9 } ;
int sintan()
{
int i ;
for(i=0; i<100 ; i++ )
{ y[i % 4] = sin( b1[i % 4] )
+ tan( b2[i % 8 ] ) ;
}
}