Empeg math functions

Posted by: andym

Empeg math functions - 10/07/2002 09:34

I am currently writing some software that uses trig functions like sin(), cos() etc. I don't seem to be able to compile, it complains that it doesn't know what sin and cos are. Is this something to do with the empeg not being too hot on floating point numbers? Is there a way to get sin and cos back?
Posted by: tonyc

Re: Empeg math functions - 10/07/2002 09:56

I am currently writing some software that uses trig functions like sin(), cos() etc. I don't seem to be able to compile, it complains that it doesn't know what sin and cos are. Is this something to do with the empeg not being too hot on floating point numbers? Is there a way to get sin and cos back?

It has nothing to do with the empeg's floating-point weaknesses, but your performance on the sin() and cos() functions might not be pretty... Are you #include-ing math.h? If you are, are you linking with the -lm switch? That tells it to use the math library.
Posted by: andym

Re: Empeg math functions - 10/07/2002 11:00

In reply to:

If you are, are you linking with the -lm switch? That tells it to use the math library.



Ahh, no I wasn't (slap on wrist for not reading the docs). As for the calls themselves, there are about 10 of them being called every couple of seconds. I'll give that a go.

Thanks!!