Skip to content

Commit 8a5cad4

Browse files
📚 docs(README): Improve code sample.
1 parent a7a415a commit 8a5cad4

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,11 @@ See [docs](https://arithmetic-type.github.io/double).
1717
Parent is [js-library](https://github.com/make-github-pseudonymous-again/js-library).
1818

1919
```js
20-
import {mul} from '@arithmetic-type/double';
21-
mul(6, 7); // 42
20+
import {add, mul, sub, div} from '@arithmetic-type/double';
21+
add(0.1, 0.2); // 0.30000000000000004
22+
mul(0.1, 0.2); // 0.020000000000000004
23+
sub(0.1, 0.2); // -0.1
24+
div(0.1, 0.2); // 0.5
2225
```
2326

2427
[![License](https://img.shields.io/github/license/arithmetic-type/double.svg)](https://raw.githubusercontent.com/arithmetic-type/double/main/LICENSE)

0 commit comments

Comments
 (0)