DSPRelated.com
Forums

Cosine function in sin.asm for Sharc 21061

Started by Mikkel Haugstrup June 8, 2004
Is it just me or doesn't the cosine function in sin.asm work?
I got the sine function running fine, but for instance cos(1)
returns -1.#INF0000.

Has anybody used the cosine function with succes? Or know another a
cosine/sine approximation routine that works?

/Mikkel


Mikkel Haugstrup wrote:
> Is it just me or doesn't the cosine function in sin.asm work? > I got the sine function running fine, but for instance cos(1) > returns -1.#INF0000. > > Has anybody used the cosine function with succes? Or know another a > cosine/sine approximation routine that works? > > /Mikkel
I believe that cos() returns a double. Try cosf() instead, and make sure you include math.h. -- Jim Thomas Principal Applications Engineer Bittware, Inc jthomas@bittware.com http://www.bittware.com (703) 779-7770 When you have a new hammer, the whole world looks like a nail.