/***************************************************************************** The original purpose of this test program was to show that floating point calculations do in fact work under PMODE/W. However, during development we found that floating point under DOS/4GW was EXTREMELY slow. Run this on a PC without an FPU or disable the FPU on your 486. Try it under DOS/4GW and under PMODE/W and notice the speed difference. If the timing values are too close to be able to tell, try changing the variable "count" to something larger. For those who think this is not accurate because of the cprintf() that is in there, if you remove the cprintf() from the innermost loop you will find that the results are pretty much the same as far as the ratio of the 2 speeds goes. *****************************************************************************/ #include #include #include #include unsigned int count=10000; #define M_PI 3.141592654 double dtemp; int x,line; clock_t tstart,tend; union REGS r; #pragma aux mode3="mov ax,3","int 10h",modify [ax]; main(void) { mode3(); printf("This program will test several Watcom C floating point functions\n"); printf("for speed. Each function will be executed %d times. Depending\n",count); printf("on the speed of your system, this may take a while. This test is\n"); printf("only of use on systems WITHOUT a floating point unit.\n"); line=6; gotoxy(0,line); tstart=clock(); cprintf("pow() Test"); for(x=0;x