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.19 to 1.0.20

9

BigDecimal.js

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

const ten = BigDecimal.BigDecimal(10);
let rounding = {maximumSignificantDigits: 8, roundingMode: "half-even"};
const minimumSignificantDigits = Math.pow(2, Math.ceil(Math.log2(bitLength(bigIntAbs(BigInt(value.exponent)) + 1n) / Math.log2(BASE))))
let rounding = {maximumSignificantDigits: Math.max(minimumSignificantDigits, 8), roundingMode: "half-even"};
let result = undefined;

@@ -703,4 +704,4 @@ let fd = 0n;

const v = Number(x.significand) * BASE**exponent;
const numberValue = Math[name](v);
if (name !== "sin" && name !== "cos" && name !== "tan" || Math.abs(numberValue) < Math.PI / 4) {
if ((name !== "sin" && name !== "cos" && name !== "tan") || Math.abs(v) <= Math.PI / 4) {
const numberValue = Math[name](v);
const MIN_NORMALIZED_VALUE = (Number.MIN_VALUE * 1.25 > Number.MIN_VALUE ? Number.MIN_VALUE : Number.MIN_VALUE * (Number.MAX_SAFE_INTEGER + 1) / 2) || 2**-1022;

@@ -934,2 +935,2 @@ const a = Math.abs(numberValue);

export {BigDecimal, BigFloat}
export {BigDecimal, BigFloat};
{
"name": "@yaffle/bigdecimal",
"version": "1.0.19",
"version": "1.0.20",
"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