home *** CD-ROM | disk | FTP | other *** search
- #include <stdio.h>
- #include <stdlib.h>
- #include <time.h>
- #include "math.h"
-
- int main(void)
- {double u,s;
- int t1,t2;
- s = 0;
- t1 = clock();
- for(u=0.0;u<100.0;u+=0.001)
- s += sin(u);
- t2 = clock();
- printf(" %d %20.12g\n",t2-t1,s);
- printf(
- " if fastmath is installed and ON the first number sould be around 100.\n");
- printf("If it is around 400 fastmath is OFF or you are still using the");
- printf(" inline sin\nIn this case you should make sure that the modified");
- printf(" math.h\nis included properly.\n");
- }
-
-