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
Cosine function in sin.asm for Sharc 21061
Started by ●June 8, 2004
Reply by ●June 8, 20042004-06-08
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? > > /MikkelI 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.