4.4.0 • Published 1 year ago

mnjs v4.4.0

Weekly downloads
44
License
MIT
Repository
github
Last release
1 year ago

mnjs

License: MIT mnjs version npm bundle size (scoped) npm npm npm.io

MATH NODE JS (MNJS): A tiny math library for node.js & JavaScript on browser

Installation

npm install mnjs

http://placehold.jp/24/cb0101/ffffff/280x45.png?text=npm%20install%20mnjs

yarn add mnjs

http://placehold.jp/24/25799f/ffffff/280x45.png?text=yarn%20add%20mnjs

<script src="https://cdn.jsdelivr.net/npm/mnjs/index.js"></script>

http://placehold.jp/24/bd483b/fec82f/785x45.png?text=%3Cscript%20src%3D%22https%3A%2F%2Fcdn.jsdelivr.net%2Fnpm%2Fmnjs%22%3E%3C%2Fscript%3E

Some of the solutions provided by the mnjs library

// JavaScript
0.1 + 0.2 = 0.30000000000000004   // 0.1 + 0.2 === 0.3 returns false
0.2 + 0.7 = 0.8999999999999999    // 0.2 + 0.7 === 0.9 returns false
0.7 - 0.2 = 0.49999999999999994   // 0.7 - 0.2 === 0.5 returns false
0.1 * 0.2 = 0.020000000000000004  // 0.1 * 0.2 === 0.02 returns false
0.3 / 0.1 = 2.9999999999999996    // 0.3 / 0.1 === 3 returns false
1.2 % 0.5 = 0.19999999999999996   // 1.2 / 0.5 === 0.2 returns false

// MNJS library
mnjs.add(0.1, 0.2)   = 0.3      // mnjs.add(0.1, 0.2)  === 0.3 returns true
mnjs.add(0.2, 0.7)   = 0.9      // mnjs.add(0.2, 0.7)  === 0.9 returns true
mnjs.subt(0.7, 0.2)  = 0.5      // mnjs.subt(0.7, 0.2) === 0.5 returns true
mnjs.mult(0.1, 0.2)  = 0.02     // mnjs.mult(0.1, 0.2) === 0.02 returns true
mnjs.divi(0.3, 0.1)  = 3        // mnjs.divi(0.3, 0.1) === 3 returns true
mnjs.rem(1.2, 0.5)   = 0.2      // mnjs.rem(1.2, 0.5)  === 0.2 returns true
<!-- html -->
<!DOCTYPE html>
<html>
	<head>
		<title>mnjs</title>
		<!--<script src="https://cdn.jsdelivr.net/npm/mnjs@4.4.0/index.js"></script>-->
		<script src="https://cdn.jsdelivr.net/npm/mnjs/index.min.js"></script>
		<!--            This link is the latest mini version ☝             -->
	</head>
	<body>
		<script>
			let myNumber = 0.1;
			const myCube = mnjs.cube(myNumber);
			// mnjs.cube(0.1) returns 0.001
			console.log(`(${myNumber})^3 returns ${myCube} in mnjs library`);
			// Math.pow(0.1, 3) or (0.1 * 0.1 * 0.1) returns 0.0010000000000000002
			console.log(`(${myNumber})^3 returns ${Math.pow(myNumber, 3)} in JavaScript`);
		</script>
	</body>
</html>
// Next JS
// index.js
// npm install mnjs --save
import mnjs from 'mnjs';
import React from 'react';

const Home = () => {

  const price = 4.5 / 3;

  return (
    <div>
      <ul>
        <li>{mnjs.add([1,8], 1).[1]}</li>
        <li>{mnjs.fix(1, 2)}</li>
        <li>{mnjs.fix(mnjs.phi,2)}</li>
        <li>{mnjs.stn('8.00')}</li>
        <li>{mnjs.zeros(2,2)}</li>
        <li>{mnjs.zeros(2.1,2)}</li>
        <li>{mnjs.zeros(2.1440000000,2)}</li>
        <li>{mnjs.zeros(2.1440000000,5)}</li>
        <li>${mnjs.zeros(price,2)}</li>
        <li>
            <a
              className="App-link"
              href="https://www.npmjs.com/package/mnjs"
              target="_blank"
              rel="noopener noreferrer"
            >
              Learn MNJS (Math Node JS)
            </a>
        </li>
      </ul>
    </div>
  );
};

export default Home;
// React JS
// App.js
// npm install mnjs --save
import { divi, zeros, stn, nts } from 'mnjs';
import logo from './logo.svg';
import './App.css';

function App() {
	const price = divi(4.2, 3);
	const priceWithFormat = zeros(price, 2);

	return (
		<div className="App">
			<header className="App-header">
				<img src={logo} className="App-logo" alt="logo" />
				<p>
					Edit <code>src/App.js</code> and save to reload.
				</p>
				<a className="App-link" href="https://reactjs.org" target="_blank" rel="noopener noreferrer">
					Learn React
				</a>
				<br />
				<a className="App-link" href="https://www.npmjs.com/package/mnjs" target="_blank" rel="noopener noreferrer">
					Learn MNJS (Math Node JS)
				</a>
				<h2>
					<p>${nts(0.0)}</p>
					Free ${zeros(stn('0.00'), 2)} <strike>${priceWithFormat}</strike>
				</h2>
				<small>Type: {typeof priceWithFormat}</small>
			</header>
		</div>
	);
}

export default App;
// Node JS
// index.js
// npm install mnjs --save

// import mnjs from 'mnjs';
// console.log(mnjs.sin.deg(mnjs.range(0, 90, 30)));
// Or

import { sin, range } from 'mnjs';
console.log(sin.deg(range(0, 90, 30)));

Examples

Use console.log() to output the result. console.log(mnjs.abs(-3.6)); // 3.6

const mnjs = require(`mnjs`);

mnjs.abs(-3.6); // 3.6

mnjs.subt(2, 5); // -3

mnjs.sqr(2) + mnjs.sqrt(4); // 6

mnjs.sqr(4) + mnjs.sqrt(4) / mnjs.pi; // 16.63661977236758

mnjs.e; // 2.718281828459045

mnjs.exp(1); // 2.718281828459045

mnjs.exp(-1); // 0.367879441171442

mnjs.exp(mnjs.pi / 3); // 2.849653908226361

mnjs.log(10); // 2.302585092994046

mnjs.ln2; // 0.693147180559945
mnjs.ln10; // 2.302585092994046

mnjs.log2e; // 1.442695040888963
mnjs.log10e; // 0.434294481903252

mnjs.log1p(5); // 1.791759469228055

mnjs.log(mnjs.e); // 1

mnjs.hypot(4); // 4
mnjs.hypot([4]); // 4
mnjs.hypot(3, 4); // 5
mnjs.hypot([3, 4]); // 5
mnjs.hypot(4, 2, 4); // 6
mnjs.hypot([4, 2, 4]); // 6
mnjs.hypot([-3, -4]); // 5
mnjs.hypot(-3, -4); // 5
mnjs.hypot([-4]); // 4
mnjs.hypot(-4); // 4
mnjs.sqrt(mnjs.add(mnjs.sqr(6), mnjs.sqr(8))) === mnjs.hypot(6, 8); // true
mnjs.hypot([-3, -4], 1); // Error: MNJS ERROR No. 01 : 05
mnjs.hypot([-3, -4], [1]); // Error: MNJS ERROR No. 01 : 05
mnjs.hypot([-3, -4, '1']); // Error: MNJS ERROR No. 01 : 05

mnjs.fix(2.718281828459045, 2); // 2.72

mnjs.inv(10); // 0.1

mnjs.ceil(1.1); // 2
mnjs.ceil(-1.1); // -1
mnjs.ceil([-0.2, 0, 0.2]); // [-0, 0, 1]

mnjs.max(1, 10, 3, -2); // 10
mnjs.max([1, 10, 3, -2]); // 10
mnjs.max(1, 10, 3, ''); // Error: MNJS ERROR No. 01 : 05

mnjs.min(5, 1, -3.2, 0.5, 3); // -3.2
mnjs.min([5, 1, -3.2, 0.5, 3]); // -3.2
mnjs.min(); // Error: MNJS ERROR No. 01 : 05
mnjs.min([]); // Error: MNJS ERROR No. 01 : 05: This function accepts numeric arguments or one numeric array argument. (num1, num2, ..., num) => {} or ([num1, num2, ..., num]) => {}

mnjs.pow(2, 4); // 16

mnjs.pow(2, -2.5); // 0.176776695296637

mnjs.cbrt(8); // 2

mnjs.nrt(0.0001, 4); // 0.1
mnjs.nrt(Infinity, Infinity); // 1
mnjs.nrt(Infinity, Infinity) === mnjs.pow(Infinity, 1 / Infinity); // true

mnjs.tau; // 6.283185307179586

mnjs.sin(1); // 0.841470984807897
mnjs.sin.rad(1); // 0.841470984807897
mnjs.sin(1) === mnjs.sin.rad(1); // true

mnjs.dtr(30); // 0.523598775598299
mnjs.sin.deg(30); // 0.5
mnjs.sin.deg(30) === mnjs.sin(mnjs.dtr(30)); // true

mnjs.cos.deg(60); // 0.5
mnjs.cos(0); // 1
mnjs.cos.rad(0); // 1
mnjs.cos(1) === mnjs.cos.rad(1); // true

mnjs.tan.deg(45); // 1

mnjs.tan(0.5); // 0.54630248984379
mnjs.tan(0.5) === mnjs.tan.rad(0.5); // true

mnjs.tan.deg(90); // -Infinity

1 / mnjs.sin.deg(30); // 2
mnjs.csc.deg(30)(
	// 2

	1 / mnjs.cos.deg(60)
) === mnjs.sec.deg(60); // true
console.log(mnjs.sec.deg(60))(
	// 2

	1 / mnjs.tan.deg(45)
) === mnjs.cot.deg(45); // true
mnjs.cot.deg(45); // 1

mnjs.cot.deg(0); // Infinity

mnjs.acsc(mnjs.csc(0.67)); // 0.67

mnjs.asec.rad(1) === mnjs.asec(1); // true

mnjs.stn('123'); // 123
mnjs.nts(123); // "123"

/***** Matrices *****/
mnjs.range(1, 10, 1); //  [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ]
mnjs.range(1, 10); //  [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ]
mnjs.range(10, 1, 1); //  [ 10, 9, 8, 7, 6, 5, 4, 3, 2, 1 ]
mnjs.range(10, 1); //  [ 10, 9, 8, 7, 6, 5, 4, 3, 2, 1 ]
mnjs.range(1, 5, 0.5); //  [ 1, 1.5, 2, 2.5, 3, 3.5, 4, 4.5, 5 ]
mnjs.range(1, 0, 0.2); //  [ 1, 0.8, 0.6, 0.4, 0.2, 0 ]
mnjs.range(10, 1, 2); //  [ 10, 8, 6, 4, 2 ]
mnjs.range(-20, 1, 0); //  Error: MNJS ERROR No. 02 : 01: The step parameter should not be:
//  1/ null
//  2/ equal or less than zero.
//  3/ greater than the absolute difference between the first and second parameter

mnjs.monolist(1, 5); //  [ 1, 1, 1, 1, 1 ]
mnjs.monolist(0.5, 3); //  [ 0.5, 0.5, 0.5 ]
mnjs.monolist(0, 5); //  [ 0, 0, 0, 0, 0 ]
mnjs.monolist(-0.5, 3); //  [ -0.5, -0.5, -0.5 ]
mnjs.monolist(-1, 5); //  [ -1, -1, -1, -1, -1 ]
mnjs.monolist(5, 1.1); //  RangeError: Invalid array length

// Most of the MNJS functions return a number or an array of numbers

const myArray = mnjs.range(0, 90, 30);
const errArray = [0, 30, '60', 90];

myArray; //  [ 0, 30, 60, 90 ]
errArray; //  [ 0, 30, '60', 90 ]

mnjs.cube(myArray); // [ 0, 27000, 216000, 729000 ]

mnjs.sin.deg(myArray[1]); // 0.5
mnjs.sin.deg(myArray); // [ 0, 0.5, 0.866025403784439, 1 ]

mnjs.abs(errArray); // Error: MNJS ERROR No. 01: This function accepting either a number or an array.
// In the case of an array, all of its elements must be numbers.
mnjs.dtr(myArray); // [ 0, 0.523598775598299, 1.047197551196598, 1.570796326794897 ]

// Note the result may change in some functions depending on the position of the arguments

mnjs.add(2, 2); //  4
mnjs.add([0, 2], [4, 8]); //  [ 4, 10 ]
mnjs.add([4, 8], [0, 2]); //  [ 4, 10 ]
mnjs.add(2, [1, 2]); //  [ 3, 4 ]
mnjs.add([1, 2], 2); //  [ 3, 4 ]
mnjs.subt(2, [1, 2]); //  [ 1, 0 ]
mnjs.subt([1, 2], 2); //  [ -1, 0 ]
mnjs.subt([0, 2], [4, 8]); //  [ -4, -6 ]
mnjs.subt([4, 8], [0, 2]); //  [ 4, 6 ]
mnjs.mult(2, [1, 2]); //  [ 2, 4 ]
mnjs.mult([1, 2], 2); //  [ 2, 4 ]
mnjs.divi(2, [1, 2]); //  [ 2, 1 ]
mnjs.divi([1, 2], 2); //  [ 0.5, 1 ]
mnjs.divi([0, 2], [4, 8]); //  [ 0, 0.25 ]
mnjs.divi([4, 8], [0, 2]); //  [ Infinity, 4 ]
mnjs.add([2], [1, 2]); // Error: MNJS ERROR No. 01 : 03: This function accepting two arguments of numbers, arrays, or one of them must be a number, and the other must be an array; In the case of arrays, all elements must be a number, the length of arrays must be equal

mnjs.pow(4, [1, 2, 3]); //  [ 4, 16, 64 ]
mnjs.pow([1, 2, 3], 4); //  [ 1, 16, 81 ]

mnjs.nrt(8, [1, 2, 3]); //  [ 8, 2.82842712474619, 2 ]
mnjs.nrt([1, 2, 3], 8); //  [ 1, 1.090507732665258, 1.147202690439877 ]
mnjs.nrt([1, 3], [3, 1]); //  [ 1, 3 ]
mnjs.nrt([3, 1], [1, 3]); //  [ 3, 1 ]

mnjs.mult(0.2, [5, 10, 15]); //  [ 1, 2, 3 ]
mnjs.mult(0.2, mnjs.range(5, 15, 5)); //  [ 1, 2, 3 ]
mnjs.mult([0.2, 0.2, 0.2], [5, 10, 15]); //  [ 1, 2, 3 ]
mnjs.mult(mnjs.monolist(0.2, 3), [5, 10, 15]); //  [ 1, 2, 3 ]
mnjs.mult(0.2, [5, 10, 15])[1] === mnjs.mult(mnjs.monolist(0.2, 3), [5, 10, 15])[1]; // true

mnjs.imul(0xffffffff, [1, 2, 3, 4, 5]); //  [ -1, -2, -3, -4, -5 ]
mnjs.rib(100000, 999999); //  returns random integer between two values, inclusive min and max value

// Remember that:
// 0 / 0 = NaN, NaN / NaN = NaN, Infinity / Infinity = NaN, Infinity / NaN = NaN
// NaN / Infinity = NaN, 0 / NaN = NaN, NaN / 0 = Nan
// 0 / Infinity = 0, Infinity / 0 = Infinity
// Infinity === Infinity returns true. Infinity is equal to itself
// Infinity > Infinity, return false
// NaN === NaN, NaN > NaN, NaN < NaN, returns false
// Infinity === NaN, Infinity > NaN, Infinity < NaN, returns false

// The change function replace x (number or numeric array element) with z if x = y
// The change and change.isEqual functions are the same
// mnjs.change(x=1, y=1, z=0)
mnjs.change(1, 1, 0) === mnjs.change.isEqual(1, 1, 0); // returns true
mnjs.change(1, 1, 0); //  returns 0
mnjs.change(1, NaN, 0); //  returns 1
mnjs.change(Infinity, Infinity, 0); //  returns 0
mnjs.change([0, NaN, 1, Infinity], NaN, 0); //  returns [0, NaN, 1, Infinity]
// where [0 = old value, NaN = old value, 1 = old value, Infinity = old value], nothing changed!
mnjs.change([0, NaN, 1, Infinity], Infinity, 0); //  returns [0, NaN, 1, 0]
// where [0 = old value, NaN = old value, 1 = old value, 0 = new value ], only Infinity value replaced with 0

// The change.isNotEqual function replace x (number or numeric array element) with z if x is not equal to y
// mnjs.change.isNotEqual(x=1, y=1, z=0)
mnjs.change.isEqual(1, 1, 0) !== mnjs.change.isNotEqual(1, 1, 0); // returns true
mnjs.change.isNotEqual(1, 1, 0); //  returns 1, where 1 is the old value of x
mnjs.change.isNotEqual(1, NaN, 0); //  returns 0, where 0 is the new value of x
mnjs.change.isNotEqual(Infinity, Infinity, 0); //  returns Infinity
mnjs.change.isNotEqual([0, NaN, 1, Infinity], NaN, 0); //  returns [0, 0, 0, 0]
// where [0 = new value, 0 = new value, 0 = new value, 0 = new value], all elements changed with new values!
mnjs.change.isNotEqual([0, NaN, 1, Infinity], Infinity, 0); //  returns [0, 0, 0, Infinity]
// where [0 = new value, 0 = new value, 0 = new value, Infinity = old value ], all elements replaced with 0 except Infinity
mnjs.change.isGreater([0, NaN, 1, Infinity], NaN, 0); //  returns [0, NaN, 1, Infinity]
mnjs.change.isLess([0, NaN, 1, Infinity], NaN, 0); //  returns [0, NaN, 1, Infinity]
mnjs.change.isGreaterOrEqual([0, NaN, 1, Infinity], Infinity, 0); // returns [0, NaN, 1, 0]
// where orEqual is true (Infinity replaced by 0)
mnjs.change.isLessOrEqual([0, NaN, 1, Infinity], Infinity, 0); // returns [0, NaN, 0, 0]
// change.isFiniteNum(x, y) or change.isFiniteNum(xArray, y)
mnjs.change.isFiniteNum([0, NaN, 1, Infinity], Infinity); // returns [Infinity, NaN, Infinity, Infinity]
// where [Infinity = new value, NaN = old value, Infinity = new value, Infinity = old value]
mnjs.change.isInfinity([-Infinity, NaN, 1, Infinity], 0); // returns [0, NaN, 1, 0]  (change ±Infinity)
mnjs.change.isPlusInfinity([-Infinity, NaN, 1, Infinity], 0); // returns [-Infinity, NaN, 1, 0]
mnjs.change.isMinusInfinity([-Infinity, NaN, 1, Infinity], 0); // returns [0, NaN, 1, Infinity]
mnjs.change.isNAN([-Infinity, NaN, 1, Infinity], 0); // returns [-Infinity, 0, 1, Infinity]

// Fermat number
mnjs.fermat(-1) or mnjs.fermat(1.2) // returns error
mnjs.fermat(0) // returns 3
mnjs.fermat([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) // returns [5, 17, 257, ..., 1.3407807929942597e+154, Infinity]

Demo Projects


Svelte Demo Project https://svelte-mnjs-chartjs.vercel.app


https://raw.githubusercontent.com/dr-montasir/public/main/mnjs/images/svelte-mnjs-chartjs.png


React Demo Project https://react-mnjs-plotlyjs.vercel.app


https://raw.githubusercontent.com/dr-montasir/public/main/mnjs/images/react-mnjs-plotlyjs.png

MNJS Object Keys

KeyDefinitionValue
absThe absolute value of a numberfunction: abs(num)
addAdditionfunction: add(num1, num2)
acosInverse cosine (in radians)function: acos(num)
acos.radInverse cosine (in radians)function: acos.rad(num)
acos.degInverse cosine (in degrees)function: acos.deg(num)
acoshInverse hyperbolic cosine (in radians)function: acosh(num)
acosh.radInverse hyperbolic cosine (in radians)function: acosh.rad(num)
acosh.degInverse hyperbolic cosine (in degrees)function: acosh.deg(num)
acotInverse cotangent (in radians)function: acot(num)
acot.radInverse cotangent (in radians)function: acot.rad(num)
acot.degInverse cotangent (in degrees)function: acot.deg(num)
acothInverse hyperbolic cotangent (in radians)function: acoth(num)
acoth.radInverse hyperbolic cotangent (in radians)function: acoth.rad(num)
acoth.degInverse hyperbolic cotangent (in degrees)function: acoth.deg(num)
acscInverse cosecant (in radians)function: acsc(num)
acsc.radInverse cosecant (in radians)function: acsc.rad(num)
acsc.degInverse cosecant (in degrees)function: acsc.deg(num)
acschInverse hyperbolic cosecant (in radians)function: acsch(num)
acsch.radInverse hyperbolic cosecant (in radians)function: acsch.rad(num)
acsch.degInverse hyperbolic cosecant (in degrees)function: acsch.deg(num)
asecInverse secant (in radians)function: asec(num)
asec.radInverse secant (in radians)function: asec.rad(num)
asec.degInverse secant (in degrees)function: asec.deg(num)
asechInverse hyperbolic secant (in radians)function: asech(num)
asech.radInverse hyperbolic secant (in radians)function: asech.rad(num)
asech.degInverse hyperbolic secant (in degrees)function: asech.deg(num)
asinInverse sine (in radians)function: asin(num)
asin.radInverse sine (in radians)function: asin.rad(num)
asin.degInverse sine (in degrees)function: asin.deg(num)
asinhInverse hyperbolic sine (in radians)function: asinh(num)
asinh.radInverse hyperbolic sine (in radians)function: asinh.rad(num)
asinh.degInverse hyperbolic sine (in degrees)function: asinh.deg(num)
atanInverse tangen (in radians)function: atan(num)
atan.radInverse tangen (in radians)function: atan.rad(num)
atan.degInverse tangen (in degrees)function: atan.deg(num)
atanhInverse hyperbolic tangen (in radians)function: atanh(num)
atanh.radInverse hyperbolic tangen (in radians)function: atanh.rad(num)
atanh.degInverse hyperbolic tangen (in degrees)function: atanh.deg(num)
ceilThe ceil function returns the smallest integer greater than or equal to a numberfunction: ceil(num)
changeThe change function replace x (number or numeric array element) with z if x = yfunction: change(x, y, z)
change.isEqualThe change.isEqual function replace x (number or numeric array element) with z if x = yfunction: change.isEqual(x, y, z)
change.isNotEqualThe change.isNotEqual replace x (number or numeric array element) with z if x is not equal to yfunction: change.isNotEqual(x, y, z)
change.isGreaterThe change.isGreater replace x (number or numeric array element) with z if x is greater than yfunction: change.isGreater(x, y, z)
change.isLessThe change.isLess replace x (number or numeric array element) with z if x is less than yfunction: change.isLess(x, y, z)
change.isGreaterOrEqualThe change.isGreaterOrEqual replace x (number or numeric array element) with z if x is greater than or equal to yfunction: change.isGreaterOrEqua(x, y, z)
change.isLessOrEqualThe change.isLess replace x (number or numeric array element) with z if x is less than yfunction: change.isLessOrEqual(x, y, z)
change.isFiniteNumThe change.isFiniteNum replace x (number or numeric array element) with y if x is finitefunction: change.isFiniteNum(x,y)
change.isInfinityThe change.isInfinity replace x (number or numeric array element) with y if x is infinityfunction: change.isInfinity(x,y)
change.isPlusInfinityThe change.isPlusInfinity replace x (number or numeric array element) with y if x is plus infinityfunction: change.isPlusInfinity(x,y)
change.isMinusInfinityThe change.isMinusInfinity replace x (number or numeric array element) with y if x is minus infinityfunction: change.isMinusInfinity(x,y)
change.isNANThe change.isNAN replace x (number or numeric array element) with y if x is NANfunction: change.isNAN(x,y)
cosCosine (in radians)function: cos(angleRadians)
cos.radCosine (in radians)function: cos.rad(angleRadians)
cos.degCosine (in degrees)function: cos.deg(angleDegrees)
coshHyperbolic cosine (in radians)function: cosh(angleRadians)
cosh.radHyperbolic cosine (in radians)function: cosh.rad(angleRadians)
cosh.degHyperbolic cosine (in degrees)function: cosh.deg(angleDegrees)
csccosecant (or cosec)function: csc(angleRadians)
csc.radcosecant (or cosec)function: csc.rad(angleRadians)
csc.degCosecant (in degrees)function: csc.deg(angleDegrees)
cschHyperbolic cosecant (or cosec)function: csch(angleRadians)
csch.radHyperbolic cosecant (or cosec)function: csch.rad(angleRadians)
csch.degHyperbolic cosecant (in degrees)function: csch.deg(angleDegrees)
cubeCube (n)^3function: cube(num)
cbrtCube Rootfunction: cbrt(num)
cotCotangent (or cotan or cotg or ctg or ctn). (in radians)function: cot(angleRadians)
cot.radCotangent (or cotan or cotg or ctg or ctn). (in radians)function: cot.rad(angleRadians)
cot.degCotangent (in degrees)function: cot.deg(angleDegrees)
cothHyperbolic cotangent (or cotan or cotg or ctg or ctn). (in radians)function: coth(angleRadians)
coth.radHyperbolic cotangent (or cotan or cotg or ctg or ctn). (in radians)function: coth.rad(angleRadians)
coth.degHyperbolic cotangent (in degrees)function: coth.deg(angleDegrees)
dtrDegrees to Radians conversionfunction: dtr(angleDegrees). Result in radians
diviDivisionfunction: divi(numerator, denominator)
eThe Number e (Euler's number)number: 2.718281828459045
expThe power of e (Euler's number)function: exp(power)
expm1The expm1 function returns e^x - 1, where x is the argument, and e the base of the natural logarithmsfunction: expm1(power)
fermatThe fermat function accepting a non-negative integerfunction: fermat(num)
fixFix to the certain decimal pointfunction: fix(num, point)
floorThe floor function returns the largest integer less than or equal to a given numberfunction: floor(num)
froundThe fround function returns the nearest 32-bit single precision float representation of a Numberfunction: fround(num)
hypotThe square root of the sum of squaresfunction: hypot(num1, num2, ..., num) or function: hypot(num1, num2, ..., num)
imulThe imul function returns the result of the C-like 32-bit multiplication of the two parametersfunction: imul(num1, num2)
invThe inverse of a numberfunction: inv(num)
ln2The natural logarithm of 2number: 0.693147180559945
ln10The natural logarithm of 10number: 2.302585092994046
logThe Natural logarithm (base e) of a numberfunction: log(x) is equivalent to ln(x) in mathematics
log1pThe natural logarithm (base e) of 1 + a numberfunction: log1p(x)
log2The base 2 logarithm of a numberfunction: log2(x)
log10The base 10 logarithm of a numberfunction: log10(x)
log2eThe base 2 logarithm of Enumber: 1.4426950408889634
log10eThe base 10 logarithm of Enumber: 0.434294481903252
maxMax function returns the largest-valued numberfunction: max(num1, num2, ..., num) or max(array of numbers)
minMin function returns the lowest-valued numberfunction: min(num1, num2, ..., num) or min(array of numbers)
monolistThe monolist function returns an array of numbers of equal values, specifying the element's value and the size of the array.function: monolist(value, size). It returns an array
multMultiplicationfunction: mult(num1, num2)
nrtN Rootfunction: nrt(num, root), when root=n={1,2,..}
ntsNumber to String conversionfunction: nts(num). Result as string
piThe Number pi (π)number: 3.141592653589793
phiThe Golden Ratio (Phi)number: 1.618033988749895
powpowerfunction: pow(num, power)
rangeThe range function returns a sequence of numbers, starting from start value by default, and increments or decrements by step value, and stops before or in specified end value.function: range(start, end, step). It returns an array
remThe remainder function (%) returns the remainder or signed remainder of a division, after one number is divided by another (called the modulus of the operation)function: rem(num1, num2)
ribThe rib function returns a random integer between two values, inclusive min and max valuefunction: rib(min, max)
roundThe round function returns the value of a number rounded to the nearest integerfunction: round(num)
rtdRadians to Degrees conversionfunction: rtd(angleRadians). Result in degrees
secSecant (in radians)function: sec(angleRadians)
sec.radSecant (in radians)function: sec.rad(angleRadians)
sec.degSecant (in degrees)function: sec.deg(angleDegrees)
sechHyperbolic secant (in radians)function: sech(angleRadians)
sech.radHyperbolic secant (in radians)function: sech.rad(angleRadians)
sech.degHyperbolic secant (in degrees)function: sech.deg(angleDegrees)
signThe sign function (+, -)function: sign(num). It returns -1, -0, 0, 1
sinSine (in radians)function: sin(angleRadians)
sin.radSine (in radians)function: sin.rad(angleRadians)
sin.degSine (in degrees)function: sin.deg(angleDegrees)
sinhHyperbolic sine (in radians)function: sinh(angleRadians)
sinh.radHyperbolic sine (in radians)function: sinh.rad(angleRadians)
sinh.degHyperbolic sine (in degrees)function: sinh.deg(angleDegrees)
sqrSquarefunction: sqr(num)
sqrtSquare Rootfunction: sqrt(num)
stnString to Number conversionfunction: stn(str). Result as number
subtSubtractionfunction: subt(num1, num2)
sumThe Sum Function, Also Called The Reducer Function. The final result of running the sum function across all elements of the array is a single value. The first argument should be one (numeric or empty) array and the second should be a number.function: sum(Array, number) or sum(Array), number=0
tanTangent (in radians)function: tan(angleRadians)
tan.radTangent (in radians)function: tan.rad(angleRadians)
tan.degTangen (in degrees)function: tan.deg(angleDegrees)
tanhHyperbolic tangent (in radians)function: tanh(angleRadians)
tanh.radHyperbolic tangent (in radians)function: tanh.rad(angleRadians)
tanh.degHyperbolic tangent (in degrees)function: tanh.deg(angleDegrees)
tauThe tau constant (2 x pi)number: 6.283185307179586
truncReturns the integer part of a numberfunction: trunc(num)
zerosAdd .00 to numberfunction: zeros(num, point). Result as string
4.4.0

1 year ago

4.3.2

2 years ago

4.3.1

2 years ago

4.3.0

2 years ago

4.2.1

2 years ago

4.2.0

2 years ago

4.0.0

2 years ago

4.1.0

2 years ago

2.2.1

2 years ago

2.2.0

2 years ago

2.4.1

2 years ago

2.4.0

2 years ago

2.2.2

2 years ago

3.2.1

2 years ago

3.0.2

2 years ago

3.0.1

2 years ago

3.2.3

2 years ago

3.0.0

2 years ago

2.3.0

2 years ago

2.1.2

2 years ago

2.1.1

2 years ago

2.3.2

2 years ago

2.3.1

2 years ago

2.1.3

2 years ago

3.3.1

2 years ago

3.3.0

2 years ago

3.1.2

2 years ago

3.1.1

2 years ago

3.1.0

2 years ago

3.3.5

2 years ago

3.3.4

2 years ago

3.3.3

2 years ago

3.3.2

2 years ago

2.1.0

2 years ago

1.8.0

3 years ago

2.0.0

3 years ago

1.9.0

3 years ago

1.7.2

3 years ago

1.6.2

3 years ago

1.7.1

3 years ago

1.7.0

3 years ago

1.6.1

3 years ago

1.6.0

3 years ago

1.5.7

3 years ago

1.5.6

3 years ago

1.5.5

3 years ago

1.5.4

3 years ago

1.5.3

3 years ago

1.5.2

3 years ago

1.5.0

3 years ago

1.4.1

3 years ago

1.4.0

3 years ago

1.3.8

3 years ago

1.3.7

3 years ago

1.3.6

3 years ago

1.3.5

3 years ago

1.3.4

3 years ago

1.3.3

3 years ago

1.3.2

3 years ago

1.3.1

3 years ago

1.3.0

3 years ago

1.2.6

3 years ago

1.2.5

3 years ago

1.2.4

3 years ago

1.2.3

3 years ago

1.2.2

3 years ago

1.2.1

3 years ago

1.2.0

3 years ago

1.1.7

3 years ago

1.1.6

3 years ago

1.1.5

3 years ago

1.1.4

3 years ago

1.1.3

3 years ago

1.1.2

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.14

3 years ago

1.0.13

3 years ago

1.0.12

3 years ago

1.0.11

4 years ago

1.0.10

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.2

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago