Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bailenchen/float-operation
A library of JavaScript tools for floating-point calculation
https://github.com/bailenchen/float-operation
calculation floating-point javascript operation
Last synced: about 1 month ago
JSON representation
A library of JavaScript tools for floating-point calculation
- Host: GitHub
- URL: https://github.com/bailenchen/float-operation
- Owner: bailenchen
- License: mit
- Created: 2021-01-27T10:00:40.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2021-01-30T16:06:19.000Z (almost 4 years ago)
- Last Synced: 2024-11-10T19:11:58.658Z (about 1 month ago)
- Topics: calculation, floating-point, javascript, operation
- Language: JavaScript
- Homepage:
- Size: 22 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
A library of JavaScript tools for floating-point calculation.
## Load
The library is the single JavaScript file *float-operation.js*
Browser:
```HTML
import operation from './path/to/float-operation.js';
...```
ES module:
```js
import operation from 'float-operation';
```## Use
Use 4 methods of add()、sub()、mul()、division() to perform basic arithmetic operations.
```js
import operation from 'float-operation'console.log('add', operation.add(12.123456, 10.154))
console.log('substract', operation.sub(12.123456, 10.154))
console.log('multiply', operation.mul(12.123456, 10.154))
console.log('divide', operation.division(12.123456, 10.154))
```## Licence
MIT.
See *LICENCE.md*