
Security News
Crates.io Implements Trusted Publishing Support
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
enhancedmath
Advanced tools
This package contains some enhanced mathematical operations:
Start by importing the main object into your document
import EM from 'enhancedmath';
Every single method is added onto this object, treat it a bit like the built-in Math
object. Some methods are divided into further object, so search through the object for what you need.
import EM from 'enhancedmath';
const f = EM.factorial(10);
console.log(f);
import EM from 'enhancedmath';
const d = EM.algebra.discriminator(2, 9, -1);
if (d < 0) {
console.log('...');
} else if (d === 0) {
console.log('...');
} else {
console.log('...');
}
Depending on the range of the starting interval, you will find different intersection points
import EM from 'enhancedmath';
let result = EM.algebra.intersectionPoints.bisection(-2, 0, 0.001, (x: number) => x * x - 1);
console.log(result);
result = EM.algebra.intersectionPoints.bisection(0, 2, 0.001, (x: number) => x * x - 1);
console.log(result);
import EM from 'enhancedmath';
const m = [
[1, 2, 3],
[4, 5, 6],
[7, 8, 9]
];
const trans_m = EM.matrix.transpose(m);
console.log(trans_m);
import EM from 'enhancedmath';
const matrix = [
[1, 2, 3],
[4, 5, 6],
[7, 8, 9]
];
const swappedMatrix = EM.matrix.mutations.swapRow(matrix, 0, 2);
console.log(swappedMatrix);
import EM from 'enhancedmath';
const data = [8, 12, 23, 9, 102, 7, 87, 68, 83, 25, 19, 28];
const plot = EM.probability.stemleafplot(data);
console.log(plot);
Mout Pessemier:
If you like this package, consider buying me a coffee. It will help me to keep this package up to date and create new packages.
FAQs
This package contains some enhanced mathematical operations
We found that enhancedmath demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
Research
/Security News
Undocumented protestware found in 28 npm packages disrupts UI for Russian-language users visiting Russian and Belarusian domains.
Research
/Security News
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.