Skip to content

Commit

Permalink
floating point additive identity is -0
Browse files Browse the repository at this point in the history
  • Loading branch information
bakkot committed Nov 23, 2023
1 parent 032b9ed commit e3652a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ I'm hopeful that engines will be able to have a fast path when they know everyth
### Should this work with BigInts?
[No](https://github.com/tc39/proposal-bigint-math/issues/23) - it's important that `Math.sum()` returns the Number `0`, which means that `5n + Math.sum(...bigints)` would throw when `bigints` is empty, which would be bad.
[No](https://github.com/tc39/proposal-bigint-math/issues/23) - it's important that `Math.sum()` returns the Number `-0`, which means that `5n + Math.sum(...bigints)` would throw when `bigints` is empty, which would be bad.

We should have seperate methods for summing BigInts. I'd vote for `BigInt.sum`. Maybe as part of this proposal, maybe not.
Expand Down

0 comments on commit e3652a2

Please sign in to comment.