Skip to content

A library of JavaScript tools for floating-point calculation

License

Notifications You must be signed in to change notification settings

bailenchen/float-operation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

A library of JavaScript tools for floating-point calculation.

Load

The library is the single JavaScript file float-operation.js

Browser:

<script type="module">
import operation from './path/to/float-operation.js';
...
</script>

ES module:

import operation from 'float-operation';

Use

Use 4 methods of add()、sub()、mul()、division() to perform basic arithmetic operations.

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

About

A library of JavaScript tools for floating-point calculation

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages