Unoffical empeg BBS

Quick Links: Empeg FAQ | RioCar.Org | Hijack | BigDisk Builder | jEmplode | emphatic
Repairs: Repairs

Topic Options
#104159 - 10/07/2002 09:34 Empeg math functions
andym
carpal tunnel

Registered: 17/01/2002
Posts: 3996
Loc: Manchester UK
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?
_________________________
Cheers,

Andy M

Top
#104160 - 10/07/2002 09:56 Re: Empeg math functions [Re: andym]
tonyc
carpal tunnel

Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
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.
_________________________
- Tony C
my empeg stuff

Top
#104161 - 10/07/2002 11:00 Re: Empeg math functions [Re: tonyc]
andym
carpal tunnel

Registered: 17/01/2002
Posts: 3996
Loc: Manchester UK
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!!
_________________________
Cheers,

Andy M

Top