A question: in Gcc for Solaris Sparc is there any initialization
required previous to the execution of Floating Point Instructions
in a program?
Inspection of the _start function implies that there is! Can anybody
explain the details?
Thanks for the help.
Thomas Dineen
What do you mean by 'initialization'? Here's a program that does a bit
of floating point maths. Nothing more/less than one would have in any
other C program. I must be missing the point somewhere.
sparrow /export/home/drkirkby % cat test.c
#include <stdio.h>
#include <math.h>
main() {
printf("The sine of 45 degrees is %lf\n",sin(45*M_PI/180));
}
sparrow /export/home/drkirkby % gcc -lm test.c
sparrow /export/home/drkirkby % ./a.out
The sine of 45 degrees is 0.707107
--
Dave (from the UK)
Please note my email address changes periodically to avoid spam.
It is always of the form: month...@althorne.org
Hitting reply will work for a few months only - later set it manually.
http://chessdb.sourceforge.net/ - a Free open-source Chess Database
Much depends on which "instructions" you are going to be using.
I'm not sure where your "_start" function comes from. Please explain
further.
In general, I wouldn't be surprised if mathematical libraries (including
libm) require some initialization. But that should be all taken care of
under the covers. For everyday maths, you shouldn't need to do anything.
A bientot
Paul
--
Paul Floyd http://paulf.free.fr