Socket
Socket
Sign inDemoInstall

add

Package Overview
Dependencies
0
Maintainers
2
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.0.4 to 2.0.5

6

index.js

@@ -141,2 +141,8 @@ // The minimum machine rounding error

function accSum(p) {
// Zero length array, or all values are zeros
if(p.length === 0 || maxAbs(p) === 0) {
return 0
}
var tfmd = transform(p)

@@ -143,0 +149,0 @@

2

package.json
{
"name": "add",
"version": "2.0.4",
"version": "2.0.5",
"description": "A cross-browser, numerically stable algorithm to add floats accurately",

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

@@ -27,3 +27,3 @@ /**

test('accumulate', function (t) {
t.plan(4)
t.plan(5)

@@ -38,4 +38,6 @@

t.equal(algorithm([0]), 0, 'Rump-Ogita-Oishi summation of zero array')
t.equal(algorithm([0, 0, 0]), 0, 'Rump-Ogita-Oishi summation of zero array')
t.equal(algorithm([]), 0, 'Rump-Ogita-Oishi summation of empty array')
})
SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc