Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
zloirock committed Apr 16, 2024
1 parent 3a54109 commit e7e9d71
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
- Added `es.` namespace modules, `/es/` and `/stable/` namespaces entries
- [Explicit Resource Management stage 3 proposal](https://github.com/tc39/proposal-explicit-resource-management)
- Some minor updates like [explicit-resource-management/217](https://github.com/tc39/proposal-explicit-resource-management/pull/217)
- Added [`Math.sumPrecise`](https://github.com/tc39/proposal-math-sum/) stage 2.7 proposal
- Built-ins:
- `Math.sumPrecise`
- [`Promise.try`](https://github.com/tc39/proposal-promise-try):
- Built-ins:
- `Promise.try`
Expand Down
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ structuredClone(new Set([1, 2, 3])); // => new Set([1, 2, 3])
- [`Symbol.metadata` for decorators metadata proposal](#symbolmetadata-for-decorators-metadata-proposal)
- [Stage 2.7 proposals](#stage-27-proposals)
- [`Promise.try`](#promisetry)
- [`Math.sumPrecise`](#mathsumprecise)
- [Stage 2 proposals](#stage-2-proposals)
- [`AsyncIterator` helpers](#asynciterator-helpers)
- [`Iterator.range`](#iteratorrange)
Expand Down Expand Up @@ -2525,6 +2526,24 @@ Promise.try(async () => 42).then(it => console.log(`Promise, resolved as ${it}`)
Promise.try(async () => { throw 42; }).catch(it => console.log(`Promise, rejected as ${it}`));
```

##### [`Math.sumPrecise`](https://github.com/tc39/proposal-math-sum)
Module [`esnext.math.sum-precise`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.math.sum-precise.js)
```js
class Math {
static sumPrecise(items: Iterable<number>): Number;
}
```
[*CommonJS entry points:*](#commonjs-api)
```js
core-js/proposals/math-sum
core-js(-pure)/full/math/sum-precise
```
[*Examples*](https://tinyurl.com/2bd3nako):
```js
1e20 + 0.1 + -1e20; // => 0
Math.sumPrecise([1e20, 0.1, -1e20]); // => 0.1
```

#### Stage 2 proposals[⬆](#index)
[*CommonJS entry points:*](#commonjs-api)
```
Expand Down

0 comments on commit e7e9d71

Please sign in to comment.