Bug #80953 Documentation over Infinity vs NaN
Submitted: 5 Apr 2016 1:59 Modified: 27 Jun 2018 14:27
Reporter: Rick James Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version:5.7 OS:Any
Assigned to: CPU Architecture:Any
Tags: spatial

[5 Apr 2016 1:59] Rick James
Description:
"... infinite (that is, NaN)"
-- http://dev.mysql.com/doc/refman/5.7/en/spatial-convenience-functions.html

"Infinity" and "NaN" are different Float concept; the wording makes it sound like they are interchangeable.

Infinity is bigger than any possible number.  It is the result of 1/0 (etc).

NaN ("not a number") is the result of 0/0 and other things.

Perhaps the GIS docs were copied from somewhere else?  Where Infinity and NaN really existed, unlike MySQL's arithmetic which leads to NULL?

mysql> SELECT 1/0, 0/0;
+------+------+
| 1/0  | 0/0  |
+------+------+
| NULL | NULL |
+------+------+

How to repeat:
N/A

Suggested fix:
Reword
[5 Apr 2016 4:26] MySQL Verification Team
Hello Rick,

Thank you for the report and feedback!

Thanks,
Umesh
[27 Jun 2018 14:27] Paul DuBois
Posted by developer:
 
The code uses std::isfinite(), which is false for +/-Inf and NaN. I will change:
  infinite (that is, NaN)
To:
  infinite or NaN