atan2() down-under?

Go To Last Post
2 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi there,

I'd first like to give maximum praise to the gcc-avr project!
It's excellent!

I had to use the atan2() func recently and I don't if it's
me or does the atan2(a, b) func supposed to give the
arc tangent of (a/b)?

Because it looks like it's giving the arc tangent of (b/a)
which is contrary to the specs(and IEEE?).

I don't want to patch the assembler source myself,
so could someone with more experience look at
this?

Thanks,
Mu'ath.

PS: Maybe I have this all backward myself ;)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Mu'ath

atan2(x,y) equals atan(y/x), except that x can equal 0 in atan2.

This was my understanding so far. Please correct me if I am wrong and I change the code.

Reiner

admin's test signature