Forum : 8051
Original Post
Post Information | Post |
---|---|
July 3, 2008 - 12:09pm
|
The atan2 maths function does not seem to handle the singularity correctly. The whole point of atan2(y,x) as opposed to atan(y/x), is to be able to give the correct angle (+/- pi/2) when x is zero, and the parameter to atan would become infinite. However I find that the BCD(float) version (?atan2f) actually returns zero if the second parameter is zero, and the IEEE version (?atan2) returns NAN. I have tested it over the specified range of -pi...pi by I am using Ride BN 746-51 regards Tim Jackson |
ok. This is old stuff for us, but we will fix it.
I guess you are implementing your calculator.
Thanks for the report,
Francis
Thanks. I'm actually implementing a CNC controller with USB flash disk on the uPSD3434.
It's a bit worrying when cutting an arc and the tool suddenly jumps to the centre of the curve!
I've put in a macro solution for now, which seems to work ok.
Tim
The bug is fixed in the libraries.
Fix will be available in the next release.
Stéphane