My environment: DolphinDB server 2.00.8 on Linux
I used a where condition (which compares floating point numbers) to filter table data, but the query result is incorrect.
Here’s what I did:
I have a table containing the result of my factor analysis on level2 market data. See screenshot below:
I want to select data from the table with the condition: factorValue > percentile(factorValue, 80)
.
The result of percentile(factorValue, 80)
is 2679.999999999999545. Therefore, in the screenshot above, there should be 2 records satisfying this condition: the records with factorValue 80329.0602 and 2680.
But the query only returned 1 record. The record with factorValue = 2690 is not returned. Where is the problem?