Mail Archives: djgpp/1997/08/06/03:34:53
[ snip ]
> float floating_cosine[360];
> float floating_sine[360];
>
> inline void Floating::init(void) {
> int i;
> // initialise the sine and cosine tables (360 degrees).
> for(i = 0; i <= 360; i++) {
> floating_cosine[i] = (float)(cos((double)i*3.1415926/180.0));
> floating_sine[i] = (float)(sin((double)i*3.1415926/180.0));
> }
> }
Found my error, and it was SOO simple! That <= should just be a <!!! I
hate it when the answer is that simple!!! I guess I was expecting
something larger, since it only affected floating point math, and only
one of the numbers at that.
> Now to some more serious stuff. When I added some optomization to the
> project, I got a "compiler internal error." I added quite a few,
> -ffast-math -02 -finline -finline-functions -fno-strength-reduce. I
> took out the -finline and -finline-functions and the error disapeared.
However, that doesn't fix this. The above still occurs, however, I'm
going to upgrade to DJGPP 2.01 and see if that fixed it.
Jeff
PS: Why is it that I always find the answer just after posting the
question? :)
--------------------------------------------
- Code X Software -
Programming to a Higher Power
email: mailto:pweeks AT execulink DOT com
web: http://www.execulink.com/~pweeks/
--------------------------------------------
- Raw text -