
Security News
Package Maintainers Call for Improvements to GitHub’s New npm Security Plan
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
the safer integer in js is 9007199254740991.
we can see this number big but I was limited for my RSA system. So I've reinvent the number in js: number are array. Each numberarray are compose like this
// realnumber:
let mynum = 23
// arraynumber:
let mynum = [3,2]
the number are reverst because it's more easier to manipuling this. But don't worry using the transform and intoString methods you havn't to read inverse Array of number
const bmath = require("bettermath")
let num1 = bmath.transform(9007199254740991)
let num2 = bmath.add(num1, bmath.transform(1) /* or [1]*/)
console.log(bmath.intoString(num2)) // return 9007199254740992
console.log(bmath.isEqual(num1, num2)) // return false
return a Array
transform number in to Array ex:
bmath.transform(45) // return [5, 4]
return an Array
add tu Arraynumber ex:
bmath.add([5, 4], (5, 4)) // returnn [0, 9]
return a String
transform Arraynumber in String ex:
bmath.intoString([5, 4])// return 45
exactly like intoString but it's return Number can be NaN and Infinite
for compare to Arraynumber
return boolean ex:
bmath.isEqual([5, 4],[5, 4]) // return true
reduce Arraynumber with 0 useless
return an Array
bmath.reduce([1,0]) // return [1]
substract 2 Arraynumber
return an Array ex:
bmath.sub([5, 4], [1]) // return [4, 4]
multiply 2 Arraynumber
return an Array ex:
bmat.mul([2],[3]) // return 6
divide to number (euclidienne)
return an object like this {result:[x], modulo:[x]}
ex:
bmat.div([4],[3]) // return {result: [1], modulo:[1]}
if you want to add somthing to the project go on github and good luck because this are brainfuck.
FAQs
numers are array for more bigger number
We found that bestmath demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
Product
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.