REAL, DOUBLE inexact precision

Hello all,

In the documentation on numerics it mentions for REAL and DOUBLE precision that the result will not always be the same but an approximation.

Case in point :- a value from our data which is inserted into a DOUBLE
119.68753814697266
when selected from crate is
119.68646766399515

Can I ask why this is the case ? Are we supposed to use the NUMERIC function for selecting to get a more accurate value ?

Many thanks
David

Dear David,

thank you for writing in. The QuantumLeap folks also discovered this the other day at [1].

Following up on that, [3] has a corresponding solution to access the original value.

With kind regards,
Andreas.


  1. Possible precision loss w/ Crate 4.4.+ geoqueries · Issue #483 · orchestracities/ngsi-timeseries-api · GitHub ↩︎

  2. Query by non-primary key causes geo_point to change precision · Issue #10452 · crate/crate · GitHub ↩︎

  3. support crate 4.2.x and above · Issue #430 · orchestracities/ngsi-timeseries-api · GitHub ↩︎ ↩︎