orientechnologies / orientdb

OrientDB is the most versatile DBMS supporting Graph, Document, Reactive, Full-Text and Geospatial models in one Multi-Model product. OrientDB can run distributed (Multi-Master), supports SQL, ACID Transactions, Full-Text indexing and Reactive Queries.
https://orientdb.dev
Apache License 2.0
4.72k stars 870 forks source link

SQL command round result of minus operation with high precision numbers #10212

Open Nulhiedbriks opened 2 months ago

Nulhiedbriks commented 2 months ago

OrientDB Version: 3.2.7

I try to search vertex with a difference between a field (type Double) and a Number i get a round result when result is extremely closed to 0.

Let name the field : vertex_value with the type Double and value : 0.7243372797966003 When i do SEARCH vertex_value FROM my_vertex it shows : 0.7243372797966003 When i do SEARCH vertex_value - 0.7243372532921638 FROM my_vertex it shows : 0

I tried to write my own function with studio (in javascript). The testing show the result that i expect (which is 2.6504436534402487e-8 ) but on SQL command it return 0. I had also check all types.

Any idea of what is wrong ?