Skip to content

Commit 1dd317e

Browse files
committed
Qualify the need for precision
1 parent 59bcd94 commit 1dd317e

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

docs/cookbook.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,11 +143,9 @@ WHERE id = 1;
143143

144144
Database `NUMERIC` and `DECIMAL` types provide exact decimal arithmetic. When JavaScript applications query these values, they currently must receive them as strings (or as `Number`s, which may lose precision from the get-go) that are then converted to `Number` (which also loses precision), or use a userland decimal library.
145145

146-
Native JavaScript Decimal would allow seamless interchange with database decimal types.
147-
148146
### Why This Matters for JavaScript
149147

150-
JavaScript forces developers to choose between:
148+
JavaScript forces developers working with numeric data in a setting where exactness matters to choose between:
151149

152150
- Binary floats (precision errors, bugs, non-trivial knowledge of binary float problems and some countermeasures that may not always work)
153151
- Userland libraries (bundle size, coordination, performance)

0 commit comments

Comments
 (0)