inequality-arbitrary-precision

1.0.1 • Public • Published

inequality-arbitrary-precision

Build Status Coverage Status Code Climate

Inequality operations abstraction to extend core-arbitrary-precision

Install

npm i inequality-arbitrary-precision

Adapters

Usage

var adapter = require('floating-adapter');
var inequalityEnhancer = require('inequality-arbitrary-precision');

var Decimal = inequalityEnhancer(require('core-arbitrary-precision')(adapter));

new Decimal('12').gt(new Decimal('5')); // => true
new Decimal('12').lt(new Decimal('5')); // => false

Operations: gt, gte, lt, lte, cmp (-1, 0, 1).

Individual extenders can be applied as inequalityEnhancer.lt(Decimal);

See spec.

Package Sidebar

Install

npm i inequality-arbitrary-precision

Weekly Downloads

14

Version

1.0.1

License

MIT

Last publish

Collaborators

  • javiercejudo