Skip to content

Loss of precision on Float fields #2903

@esistgut

Description

@esistgut

Bug description

I have a price Float @default(0) field and while the value stored in the database row (postgres) is 0.69 the value returned by the prisma client is 0.6900000000000001 (this is a console.log on the output of .findMany)

Environment & setup

  • OS: ArchLinux
  • Database: PostgreSQL
  • Prisma version: 2.1.3
  • Node.js version: 12.17

Metadata

Metadata

Assignees

Labels

bug/2-confirmedBug has been reproduced and confirmed.kind/bugA reported bug.tech/enginesIssue for tech Engines.topic: floating point typesTopic related to floating point types and precision loss

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions