Hello managers,
Has anyone else noticed the following strange behavior?
Run the following program:
#include <stdio.h>
void main()
{
float fnum,dec;
fnum = 0.18;
printf("FNUM = %f\n",fnum);
dec = fnum * 10000.0;
printf("DEC = %f\n",dec);
}
and you will get :
FNUM = 0.180000
DEC = 1800.000122
This same output is produced using both cc and gcc-2.7.0
The machine I run this code is a DEC 3000/600 with OSF1/v3.2
If instead of float, use double the problem disappears !
..I didn't notice any sign ``Pentium inside'' on the cover though..
Kosmas Papachristos
Received on Tue Aug 01 1995 - 17:22:28 NZST