Back

double precision issue with appwrite 1.2.1

  • 1
  • Databases
  • Flutter
  • Tools
gidrokolbaska
18 Feb, 2023, 18:21

Let's say, I create a document in a collection with a double=59.930670 When i read the payload from realtime listener, it contains that double but the value is equal to 59.9307. Why is that?)

TL;DR
User is experiencing a double precision issue with Appwrite 1.2.1. They upgraded from 1.2.0 to 1.2.1 but the issue persists. The issue is related to a bug in the application and affects both the console/dashboard and the application. The issue is also observed when creating a document with a specific double value, which is then returned as a different value in the payload of the real-time listener. No solution or ETA for the fix is mentioned in the thread.
gidrokolbaska
18 Feb, 2023, 18:24

Realtime listener returns wrong value in payload

gidrokolbaska
18 Feb, 2023, 18:27

It actually parses wrong values even when I create the document

gidrokolbaska
18 Feb, 2023, 18:28

And I can't change that value in the console myself. It just changes back from 59.930670 to 59.9307

Torsten Dittmann
18 Feb, 2023, 18:30

Potentially a console issue? Can you update and see the number with higher precision in like an app?

gidrokolbaska
18 Feb, 2023, 18:31

Sry, I can't seem to understand what you mean

Torsten Dittmann
18 Feb, 2023, 18:31

Is the issue only occurring in the console/dashboard or also in your application?

gidrokolbaska
18 Feb, 2023, 18:32

well, the title and initial description already say that the issue is in application as well πŸ™‚

gidrokolbaska
18 Feb, 2023, 18:34

seems like a bug tbh

gidrokolbaska
18 Feb, 2023, 18:41

yep, you actually had an issue opened for that, which was closed as completed, I can also see that there was a merge, but, unfortunately, the issue remains https://github.com/appwrite/appwrite/issues/2766

gidrokolbaska
18 Feb, 2023, 18:58

Upgrading from 1.2.0 to 1.2.1 didn't help

gidrokolbaska
18 Feb, 2023, 19:18

double precision issue with appwrite 1.2.1

Drake
18 Feb, 2023, 21:15

I think the precision of float values is currently only 4 decimal places. I think we plan on changing it to 8 in the next version of Appwrite.

gidrokolbaska
18 Feb, 2023, 21:26

Damn, that's sad... Any ETA when it will be released?

Drake
18 Feb, 2023, 21:30

maybe in a few months?

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more