Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loss of precision in int64-type numeric values #5449

Open
PureBulb opened this issue Feb 27, 2025 · 2 comments
Open

Loss of precision in int64-type numeric values #5449

PureBulb opened this issue Feb 27, 2025 · 2 comments

Comments

@PureBulb
Copy link

Description

when I store some big number which like 64bit size number,they loss precision

Steps to Reproduce

you just store a document like
json{id:1895131128281567232}
you can get same mistake

Expected Behaviour

support big number

Your Environment

the latest docker image (today is 2022.02.28)

  • CouchDB version used: 3.4.2
  • Browser name and version: edge
  • Operating system and version: arch linux

Additional Context

@rnewson
Copy link
Member

rnewson commented Feb 28, 2025

For now you'll need to use strings and a bigdec/int library module to handle numbers beyond the normal range of the Javascript engine. In the near future I believe we'll enable the big number extension of quickjs, though you will then have to configure your couchdb nodes to run with that engine.

@rnewson
Copy link
Member

rnewson commented Feb 28, 2025

#5452

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants