Socket
Socket
Sign inDemoInstall

@yaffle/bigdecimal

Package Overview
Dependencies
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@yaffle/bigdecimal - npm Package Compare versions

Comparing version 1.0.16 to 1.0.17

12

BigDecimal.js

@@ -370,2 +370,3 @@ /*jslint bigint: true, vars: true, indent: 2*/

}
if (BASE !== 2) {
const differenceOfLogarithms = Number(sum(diff(a.exponent, b.exponent), (digits(a.significand) - digits(b.significand))));

@@ -375,2 +376,13 @@ if (differenceOfLogarithms !== 0) {

}
} else {
const x = a.exponent >= b.exponent ? a.significand : a.significand >> BigInt(diff(b.exponent, a.exponent));
const y = b.exponent >= a.exponent ? b.significand : b.significand >> BigInt(diff(a.exponent, b.exponent));
if (x < y) {
return -1;
}
if (y < x) {
return +1;
}
//return x < y ? -1 : (x > y ? +1 : 0);
}
const x = a.exponent <= b.exponent ? a.significand : bigIntScale(a.significand, diff(a.exponent, b.exponent));

@@ -377,0 +389,0 @@ const y = b.exponent <= a.exponent ? b.significand : bigIntScale(b.significand, diff(b.exponent, a.exponent));

2

package.json
{
"name": "@yaffle/bigdecimal",
"version": "1.0.16",
"version": "1.0.17",
"description": "Arbitrary precision decimal arithmetic library. Polyfill for decimal proposal. Implemented on the top of BigInt.",

@@ -5,0 +5,0 @@ "main": "BigDecimal.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc