-
Notifications
You must be signed in to change notification settings - Fork 25k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Float type does not follow IEEE 754 standard #27653
Comments
This is by design. Json has no way to represent inifinity or NaN. |
@rjernst Should the documentation be updated to say it follows RFC 4627 or ECMA-262 instead of IEEE 754? The Elasticsearch docs don't accurately reflect the accepted values for float/half-float/double
|
I'll reopen as a docs issue, but I'm not sure in what way we should change the docs. /cc @jpountz |
@drw112 would something like that work for you: |
Yes, I think that is clear and concise. Thanks! |
Since elastic#25826 we reject infinite values for float, double and half_float datatypes. This change adds this restriction to the documentation for the supported datatypes. Closes elastic#27653
Elasticsearch version 6.0.0
Plugins installed: [x-pack]
JVM version (
java -version
): 1.8.0_60OS version (
uname -a
if on a Unix-like system): Centos 7Description of the problem including expected versus actual behavior:
https://www.elastic.co/guide/en/elasticsearch/reference/6.0/number.html
float | A single-precision 32-bit IEEE 754 floating point.
https://en.wikipedia.org/wiki/IEEE_754 "As with IEEE 754-1985, the biased-exponent field is filled with all 1 bits to indicate either infinity (trailing significand field = 0) or a NaN (trailing significand field ≠ 0)."
Elasticsearch is rejecting our infinity value floats. The Elasticsearch documentation claims to follow the IEEE 754 float spec but is rejecting infinity and NaN values.
Steps to reproduce:
Provide logs (if relevant):
"caused_by"=>{"type"=>"illegal_argument_exception", "reason"=>"[float] supports only finite values, but got [Infinity]"}
The text was updated successfully, but these errors were encountered: