$ dgraph version
Dgraph version : v21.03.0
Dgraph codename : rocket
Dgraph SHA-256 : b4e4c77011e2938e9da197395dbce91d0c6ebb83d383b190f5b70201836a773f
Commit SHA-1 : a77bbe8ae
Commit timestamp : 2021-04-07 21:36:38 +0530
Branch : HEAD
Go version : go1.16.2
jemalloc enabled : true
Docker on Windows
We are trying to save the double-precision float value ‘0.8104214076001297’ to the database using both JSON and RDF mutations. The value will be saved, but queries using Ratel only show six decimal places (regarding this testcase the result shown is ‘0.810421’) and it seems like, that there is rounding happening (tried with ‘0.8104217676001297’ where the result is ‘0.810422’). The predicate type is set to float.
Dgraph should return the most precise representation of the actual decimal value with regards to the IEEE 754 specification and should not only return 6 decimal places nor apply implicit rounding.