-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Loss of precision on Float fields with many digits #3479
Copy link
Copy link
Closed
prisma/prisma-engines
#1110Labels
bug/2-confirmedBug has been reproduced and confirmed.Bug has been reproduced and confirmed.kind/bugA reported bug.A reported bug.tech/enginesIssue for tech Engines.Issue for tech Engines.tech/engines/query engineIssue in the Query EngineIssue in the Query Enginetopic: floating point typesTopic related to floating point types and precision lossTopic related to floating point types and precision loss
Milestone
Metadata
Metadata
Assignees
Labels
bug/2-confirmedBug has been reproduced and confirmed.Bug has been reproduced and confirmed.kind/bugA reported bug.A reported bug.tech/enginesIssue for tech Engines.Issue for tech Engines.tech/engines/query engineIssue in the Query EngineIssue in the Query Enginetopic: floating point typesTopic related to floating point types and precision lossTopic related to floating point types and precision loss
Bug description
Hi, I found a problem similar to #2903, in this case, the
Floatstored on the database is1.59283191but the value returned is1.5928319100000001How to reproduce
Prisma schema:
Mutation:
Returns wrong amount:
Expected behavior
Environment & setup
Debian 11 (WSL2)Postgres 12.4v14.5.0