Float32Full ATAN inaccurate results
Eviatar Tsadok
Posts: 6
Hello,
I am using the floating point library Float32Full + A and I got inaccurate results for the trigonometric function ATAN
A. In bigger number then 50 function bring higher the 90 as a result.
B. In smaller number the function is inaccurate in more then 2 degree.
C. More so the POW function return wrong result for negative number.
Is there any support for this library?
I am stuck in a middle of project thet rely on this library.
Thanks
Eviatar
I am using the floating point library Float32Full + A and I got inaccurate results for the trigonometric function ATAN
A. In bigger number then 50 function bring higher the 90 as a result.
B. In smaller number the function is inaccurate in more then 2 degree.
C. More so the POW function return wrong result for negative number.
Is there any support for this library?
I am stuck in a middle of project thet rely on this library.
Thanks
Eviatar
Comments
I will email the author Cam Thomson tomorrow and ask him to fix this. Could you please post some inputs that produce these errors so that he'll be able to get to the problem quickly?
Sorry for the trouble. We'll get it fixed.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chip Gracey
Parallax, Inc.
I took a quick look at the problems you reported.
>...A. In bigger number then 50 function bring higher the 90 as a result.
>...B. In smaller number the function is inaccurate in more then 2 degree.
I need to do some more testing on the ATAN function to determine the source of this problem.
>...C. More so the POW function return wrong result for negative number.
The POW function was only coded for positive numbers. It can easily be changed to handle the negative case. I'll look at adding this code.
Regards,
Cam Thompson
Micromega Corporation
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Cam Thompson
Micromega Corporation
Thanks for the quick respond,
Attach my tests, results in RAD
first column - the number
second column - result from mac calculator
third column - results from Float32FULL
Number Good Float32
2.7475 1.222 1.222 - 70 deg ( Good )
5.6713 1.396 1.404 - 80 deg
11.430 1.483 1.514 - 85 deg
22.906 1.527 1.584 - 87.5 deg ( Higher then 90 deg !)
57.309 1.553 1.635 - 89 deg
0.140 0.139 0.125 - 8 deg
0.052 0.052 0.002 - 3 deg
0.017 0.017 -0.064 - 1 deg ( Negative ! )
Regards
Eviatar Tsadok
The ATAN problem was caused by an incorrect coefficient in the Taylor series. It's been corrected. Code has also been added to POW in both Float32 and Float32Full to handle negative base values. A new zip file in enclosed.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Cam Thompson
Micromega Corporation
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chip Gracey
Parallax, Inc.
It works!
Thanks for the quick and professional respond.
Eviatar