Skip to content
Snippets Groups Projects
Commit a5d17b17 authored by Vladislav Shpilevoy's avatar Vladislav Shpilevoy Committed by Konstantin Osipov
Browse files

Allow to use NaN on indexed positions

Now Tarantool doesn't support NaN's on indexed positions. Lets
allow their indexing.

According to the IEEE 754 the double has the following format:

+------+----------+----------+
| sign | exponent | fraction |
+------+----------+----------+
 1 bit   11 bit     52 bit

If the exponent is  0x7FF, the value is special one whether of sign bit.
Special value can be NaN, +inf or -inf.

If the fraction == 0, the value is inf, which sign depends on the first
bit.

If the first bit of the fraction is 1, the value is quiet NaN (qNaN),
and else the signaling NaN (sNaN).

Lets compare their in the order:
sNaN < qNaN < -inf < normal number < +inf;
sNaN == sNaN;
qNaN == qNaN;
aNaN != qNaN;
-inf == -inf;
+inf == +inf;

Closes #1701
parent 3f393ceb
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment