atan2 bug

atan2 bug

Post by Todd Matthew » Thu, 20 Mar 1997 04:00:00



I heard there is a bug with the atan2 function in the VxWorks 5.3 FPSP.
What are the symptoms of this bug?

Several of my tasks (which heavilly use floating point and double
math an geometric function) crash with an access fault.  It looks
like the access fault occurs inside of the Floating Point code.
The access fault occurs at location

_FPSP_060_CO_TBL+0x2032

Any ideas?

 
 
 

1. Tricks for approximating ATAN2

Can anybody suggest a good way (ie not much code, fast, does not need
floating point arithmetic) to approximate ATAN on an AVR 8535.  At present I
use gcc's floating point atan2(x,y) function, and whereas it works
perfectly, it links in a mass of floating point code and fills up most of
the AVR's memory.  I only need a reasonable estimate of the atan (accurate
to a few degrees), so atan2 is overkill.  x and y are long's reperesenting
distance in sub-millimetre units.

The best scheme I have come up with so far, is to calculate dist = sqrt(x^2
+y^2), and then look up angle using x/dist as the key into an acos table.  I
can probably implement sqrt entirely as integer arithmetic using longs thus
avoiding loading any floating point code.  It still seems more complicated
than should be necessary.

regards,
yoleus

2. Hardware Question

3. atan2 under 5.0

4. sshd with tcp_wrappers

5. atan2 malfunction

6. Domain Names

7. atan2 function from SAS?

8. FrontPage Discussion Groups

9. Bugs, bugs, bugs...

10. Bugs bugs and more bugs

11. To bug or not to bug !!

12. BUG FIXED was Re: Quattro & Language Driver Bug

13. Excel5.0 + SQL = bug (yes, it's *really* a bug!)