Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Not a Bug
-
10.0.4
-
None
-
None
-
None
-
Centos 6.3
Description
Something is not working correctly on handling decimals. I am still digging to the source, but this example returns NULL and should return 0.
SELECT
|
(ACOS(SIN(RADIANS(26.197506)) * SIN(RADIANS(26.197506)) + COS(RADIANS(26.197506)) * COS(RADIANS(26.197506)) * COS(RADIANS(-80.107953) - RADIANS(-80.107953)))*3959) AS `Distance` |
However, changing the numbers to one that would not round up if rounded as below returns the proper 0
SELECT
|
(ACOS(SIN(RADIANS(26.197504)) * SIN(RADIANS(26.197504)) + COS(RADIANS(26.197504)) * COS(RADIANS(26.197504)) * COS(RADIANS(-80.107953) - RADIANS(-80.107953)))*3959) AS `Distance` |