Search In This Website

Kamis, 08 Juni 2023

Math functions in Math.js

Math.js (math library for JavaScript and Node.js) supports all the math functions that are available in the following list:

Construction functions:

  • bignumber(x)
  • boolean(x)
  • chain(value)
  • complex(re, im)
  • createUnit(units)
  • fraction(numerator, denominator)
  • index(range1, range2, …)
  • matrix(x)
  • number(value)
  • sparse(x)
  • splitUnit(unit, parts)
  • string(value)

Expression functions:

  • compile(expr)
  • eval(expr [, scope])
  • help(search)
  • parse(expr [, scope])
  • parser()

Arithmetic functions:

  • abs(x)
  • add(x, y)
  • cbrt(x [, allRoots])
  • ceil(x)
  • cube(x)
  • divide(x, y)
  • dotDivide(x, y)
  • dotMultiply(x, y)
  • dotPow(x, y)
  • exp(x)
  • expm1(x)
  • fix(x)
  • floor(x)
  • gcd(a, b)
  • hypot(a, b, …)
  • lcm(a, b)
  • log(x [, base])
  • log10(x)
  • log1p(x)
  • log2(x)
  • mod(x, y)
  • multiply(x, y)
  • norm(x [, p])
  • nthRoot(a)
  • nthRoots(x)
  • pow(x, y)
  • round(x [, n])
  • sign(x)
  • sqrt(x)
  • square(x)
  • subtract(x, y)
  • unaryMinus(x)
  • unaryPlus(x)
  • xgcd(a, b)

Bitwise functions:

  • bitAnd(x, y)
  • bitNot(x)
  • bitOr(x, y)
  • bitXor(x, y)
  • leftShift(x, y)
  • rightArithShift(x, y)
  • rightLogShift(x, y)

Combinatorics functions:

  • bellNumbers(n)
  • catalan(n)
  • composition(n, k)
  • stirlingS2(n, k)

Complex functions:

  • arg(x)
  • conj(x)
  • im(x)
  • re(x)

Geometry functions:

  • distance([x1, y1], [x2, y2])
  • intersect(endPoint1Line1, endPoint2Line1, endPoint1Line2, endPoint2Line2)

Logical functions:

  • and(x, y)
  • not(x)
  • or(x, y)
  • xor(x, y)

Matrix functions:

  • concat(a, b, c, … [, dim])
  • cross(x, y)
  • ctranspose(x)
  • det(x)
  • diag(X)
  • dot(x, y)
  • expm(x)
  • filter(x, test)
  • flatten(x)
  • forEach(x, callback)
  • getMatrixDataType(x)numbers.
  • identity(n)
  • inv(x)
  • kron(x, y)
  • map(x, callback)
  • ones(m, n, p, …)
  • partitionSelect(x, k)
  • range(start, end [, step])
  • reshape(x, sizes)
  • resize(x, size [, defaultValue])
  • size(x)
  • sort(x)
  • squeeze(x)
  • subset(x, index [, replacement])
  • trace(x)
  • transpose(x)
  • zeros(m, n, p, …)

Probability functions:

  • combinations(n, k)
  • factorial(n)
  • gamma(n)
  • kldivergence(x, y)
  • multinomial(a)
  • permutations(n [, k])
  • pickRandom(array)
  • random([min, max])
  • randomInt([min, max])

Relational functions:

  • compare(x, y)
  • compareNatural(x, y)
  • compareText(x, y)
  • deepEqual(x, y)
  • equal(x, y)
  • equalText(x, y)
  • larger(x, y)
  • largerEq(x, y)
  • smaller(x, y)
  • smallerEq(x, y)
  • unequal(x, y)

Set functions:

  • setCartesian(set1, set2)
  • setDifference(set1, set2)
  • setDistinct(set)
  • setIntersect(set1, set2)
  • setIsSubset(set1, set2)
  • setMultiplicity(element, set)
  • setPowerset(set)
  • setSize(set)
  • setSymDifference(set1, set2)
  • setUnion(set1, set2)

Special functions:

  • erf(x)

Statistics functions:

  • mad(a, b, c, …)
  • max(a, b, c, …)
  • mean(a, b, c, …)
  • median(a, b, c, …)
  • min(a, b, c, …)
  • mode(a, b, c, …)
  • prod(a, b, c, …)
  • quantileSeq(A, prob[, sorted])
  • std(a, b, c, …)
  • sum(a, b, c, …)
  • var(a, b, c, …)

String functions:

  • math.format(value [, precision])
  • math.print(template, values [, precision])

Trigonometry functions:

  • acos(x)
  • acosh(x)
  • acot(x)
  • acoth(x)
  • acsc(x)
  • acsch(x)
  • asec(x)
  • asech(x)
  • asin(x)
  • asinh(x)
  • atan(x)
  • atan2(y, x)
  • atanh(x)
  • cos(x)
  • cosh(x)
  • cot(x)
  • coth(x)
  • csc(x)
  • csch(x)
  • sec(x)
  • sech(x)
  • sin(x)
  • sinh(x)
  • tan(x)
  • tanh(x)

Unit functions:

  • to(x, unit)

Utils functions:

  • clone(x)
  • isInteger(x)
  • isNaN(x)
  • isNegative(x)
  • isNumeric(x)
  • isPositive(x)
  • isPrime(x)
  • isZero(x)
  • typeof(x)

Bibliography:

JavaScript: The Definitive Guide, David Flanagan, O'Reilly
https://ieeexplore.ieee.org/
https://mathjs.org/
https://developer.mozilla.org/

Minggu, 04 Juni 2023

Language Accent Mark

Here are language accent mark and the unicode character number:

āáǎàēéěèīíǐìōóǒòūúǔù

a1a2a3a4e1e2e3e4i1i2i3i4o1o2o3o4u1u2u3u4

āáǎà

ēéěè

īíǐì

ōóǒò

ūúǔù

\u0101\xE1\u01CE\xE0\u0113\xE9\u011B\xE8\u012B\xED\u01D0\xEC\u014D\xF3\u01D2\xF2\u016B\xFA\u01D4\xF9

ā=a1=\u0101

á=a2=\xE1

ǎ=a3=\u01CE

à=a4=\xE0

ē=e1=\u0113

é=e2=\xE9

ě=e3=\u011B

è=e4=\xE8

ī=i1=\u012B

í=i2=\xED

ǐ=i3=\u01D0

ì=i4=\xEC

ō=o1=\u014D

ó=o2=\xF3

ǒ=o3=\u01D2

ò=o4=\xF2

ū=u1=\u016B

ú=u2=\xFA

ǔ=u3=\u01D4

ù=u4=\xF9

ā=a1=U+0101=Alt+0257

ǎ=a3=U+01CE=Alt+462

à=a4=U+00E0=Alt+0224

á=a2=U+00E1=Alt+0225

ī=i1=u+012B=Alt+0299

í=i2=u+00ED=Alt+0237

ǐ=i3=u+01D0=Alt+0464

ì=i4=u+00EC=Alt+0236

ū=U+016B

ú=U+00FA=Ctrl+',U

ǔ=U+01D4

ù=U+00F9=Ctrl+`,u


ē=U+0113

é=U+00E9=Ctrl+',e

ě=U+011B

è=U+00E8=Ctrl+`,e


ō=U+014D

ó=U+00F3=Ctrl+',o

ǒ=U+01D2

ò=U+00F2=Ctrl+`,o


ǖ=U+01D6

ǘ=U+01D8

ǚ=U+01DA

ǜ=U+01DC


ˉ=macron=\u02C9

ˇ=caron=\u02C7

ˋ=grave=\u02CB

ˊ=acute=\u02CA

Subset: Latin Extended-A

grave=ò

acute=ó

macron=ō

latin small letter with caron=ǎěǐǒǔ

diaeresis and (macron,acute,caron,grave)=ǖǘǚǜ

Subset: Combining Diacritical Marks

Caron=̌ˇ=u+02C7

Combining Grave Accent=̀ =u+0300

Combining Acute Accent= ́ =u+0301

Combining Macron=̄ =u+0304

Combining Caron=̌ =u+030C

Combining Grave Tone Mark= ̀ =u+0340

Combining Acute Tone Mark=́  =u+0341

Bibliography:

wikipedia.com
www.englishtools.org/
www.phon.ucl.ac.uk/
www.columbia.edu
www.ox.ac.uk
Pragmatics of Accents, Gaëlle Planchenault et al, John Benjamins