From: tpl@ces.cwru.edu (Tom Lightbody) Subject: gcc 1.40 no 387: can we do math? Date: 14 May 1992 03:46:22 GMT
linuxers,
if you are using 1.40 but lack a math coprocessor, tell me,
please, how you get a *functional* executable from pie.c below
the FAQ says
...if the program does any weird fp math (exp(), sin())
it'll die when you run it though....
tom (tpl@ces.cwru.edu)
/* pie.c
* constants from Kernighan&Pike,p.234
* answers:
* 3.141593 (tc2.01 8086pc)
* 3.141593 (gcc1.40 sun3/60)
* 3.1415929203539823007 (c honeywell mainframe:-)
*/
#include <stdio.h>
main(){float a,b;a=355.0;b=113.0;printf("%f\n",a/b);}