@danielsimonjr/mathts-core 0.23.0 → 0.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as exactScalesEqual, B as DimensionMismatchError, Bn as COMPLEX_ONE, C as binaryExactScale, D as exactScaleNumberCacheSize, E as divideExactScales, F as namedIrrationalScale, G as equal, H as abs, Hn as Complex, I as powerExactScale, J as multiplyScalar, K as fix, L as ratioExactScale, Ln as isUnit$1, M as irrationalPower, N as isRationalScale, O as exactScaleOf, P as multiplyExactScales, Q as subtractScalar, Qt as format, R as readScaleExpression, S as addExactScales, T as decimalExactScale, U as addScalar, Un as I, V as UnitParseError, Vn as COMPLEX_ZERO, W as divideScalar, Wn as isComplex, X as pow, Y as number, Z as round, _ as unitRowValue, _n as isBigInt$1, _t as isFraction, a as NAMED_SCALES, at as BIGNUMBER_PI, b as PI_EXACT_SCALE, bt as factory, c as UNIT_ROWS, cn as sign, ct as BigNumber, d as getUnitRow, dt as FRACTION_NEG_ONE, et as BIGNUMBER_E, f as namedExactScale, ft as FRACTION_ONE, g as unitRowExactScale, gt as Fraction, h as unitRowExactOffset, ht as FRACTION_ZERO, i as AMBIGUOUS_UNIT_SPELLINGS, in as nearlyEqual, it as BIGNUMBER_ONE, j as formatExactScale, k as exactScaleToNumber, l as UNIT_ROW_ALIASES, lt as isBigNumber, m as unitPrefixExactScale, mt as FRACTION_THIRD, nt as BIGNUMBER_LN2, o as REFUSED_UNIT_SPELLINGS, ot as BIGNUMBER_TEN, p as readUnitScale, pt as FRACTION_QUARTER, q as isNumeric, rt as BIGNUMBER_NEG_ONE, s as UNIT_PREFIX_SETS, st as BIGNUMBER_ZERO, t as Unit, tt as BIGNUMBER_LN10, u as getUnitPrefix, ut as FRACTION_HALF, v as LN2_EXACT_SCALE, vn as isBigNumber$2, w as clearExactScaleNumberCache, x as UNIT_EXACT_SCALE, y as NAMED_IRRATIONALS, z as AmbiguousUnitError, zn as COMPLEX_NEG_ONE } from "./unit-
|
|
1
|
+
import { A as exactScalesEqual, B as DimensionMismatchError, Bn as COMPLEX_ONE, C as binaryExactScale, D as exactScaleNumberCacheSize, E as divideExactScales, F as namedIrrationalScale, G as equal, H as abs, Hn as Complex, I as powerExactScale, J as multiplyScalar, K as fix, L as ratioExactScale, Ln as isUnit$1, M as irrationalPower, N as isRationalScale, O as exactScaleOf, P as multiplyExactScales, Q as subtractScalar, Qt as format, R as readScaleExpression, S as addExactScales, T as decimalExactScale, U as addScalar, Un as I, V as UnitParseError, Vn as COMPLEX_ZERO, W as divideScalar, Wn as isComplex, X as pow, Y as number, Z as round, _ as unitRowValue, _n as isBigInt$1, _t as isFraction, a as NAMED_SCALES, at as BIGNUMBER_PI, b as PI_EXACT_SCALE, bt as factory, c as UNIT_ROWS, cn as sign, ct as BigNumber, d as getUnitRow, dt as FRACTION_NEG_ONE, et as BIGNUMBER_E, f as namedExactScale, ft as FRACTION_ONE, g as unitRowExactScale, gt as Fraction, h as unitRowExactOffset, ht as FRACTION_ZERO, i as AMBIGUOUS_UNIT_SPELLINGS, in as nearlyEqual, it as BIGNUMBER_ONE, j as formatExactScale, k as exactScaleToNumber, l as UNIT_ROW_ALIASES, lt as isBigNumber, m as unitPrefixExactScale, mt as FRACTION_THIRD, nt as BIGNUMBER_LN2, o as REFUSED_UNIT_SPELLINGS, ot as BIGNUMBER_TEN, p as readUnitScale, pt as FRACTION_QUARTER, q as isNumeric, rt as BIGNUMBER_NEG_ONE, s as UNIT_PREFIX_SETS, st as BIGNUMBER_ZERO, t as Unit, tt as BIGNUMBER_LN10, u as getUnitPrefix, ut as FRACTION_HALF, v as LN2_EXACT_SCALE, vn as isBigNumber$2, w as clearExactScaleNumberCache, x as UNIT_EXACT_SCALE, y as NAMED_IRRATIONALS, z as AmbiguousUnitError, zn as COMPLEX_NEG_ONE } from "./unit-C6a_xdbr.js";
|
|
2
2
|
import typed, { create } from "typed-function";
|
|
3
3
|
const createRangeClass = /* #__PURE__ */ factory("Range", [], () => {
|
|
4
4
|
class Range {
|
|
@@ -1408,6 +1408,6 @@ function rowMajorStrides(shape) {
|
|
|
1408
1408
|
}
|
|
1409
1409
|
//#endregion
|
|
1410
1410
|
//#region src/index.ts
|
|
1411
|
-
const VERSION = "0.
|
|
1411
|
+
const VERSION = "0.24.0";
|
|
1412
1412
|
//#endregion
|
|
1413
1413
|
export { ALL_UNITS, AMBIGUOUS_UNIT_SPELLINGS, AmbiguousUnitError, BASE_UNITS, BEST_PREFIXES, BIGNUMBER_E, BIGNUMBER_LN10, BIGNUMBER_LN2, BIGNUMBER_NEG_ONE, BIGNUMBER_ONE, BIGNUMBER_PI, BIGNUMBER_TEN, BIGNUMBER_ZERO, BigNumber, COMPLEX_NEG_ONE, COMPLEX_ONE, COMPLEX_ZERO, Complex, DEFAULT_CONFIG, DERIVED_UNITS, DIMENSIONLESS, DUAL_UNARY_RULES, DimensionMismatchError, Dual, E, FRACTION_HALF, FRACTION_NEG_ONE, FRACTION_ONE, FRACTION_QUARTER, FRACTION_THIRD, FRACTION_ZERO, Fraction, FunctionRegistry, I, LN10, LN2, LN2_EXACT_SCALE, LOG10E, LOG2E, MATHTS_CONVERSIONS, MATHTS_TYPES, NAMED_IRRATIONALS, NAMED_SCALES, PHI, PI, PI_EXACT_SCALE, REFUSED_UNIT_SPELLINGS, Range, SI_DIMENSION_LENGTH, SI_PREFIXES, SQRT1_2, SQRT2, TAU, TypeRegistry, UNIT_ALIASES, UNIT_DIMENSION_LENGTH, UNIT_EXACT_SCALE, UNIT_PREFIX_SETS, UNIT_ROWS, UNIT_ROW_ALIASES, Unit, UnitParseError, VERSION, abs, addExactScales, addScalar, binaryExactScale, boxMuller, clearExactScaleNumberCache, create, createFactory, createMathTSTyped, createRangeClass, createSeededRng, createTypedFunction, decimalExactScale, dim, divideExactScales, divideScalar, equal, exactScaleNumberCacheSize, exactScaleOf, exactScaleToNumber, exactScalesEqual, fix, formatExactScale, fromSiDimensionVector, fromSiDimensions, getPrefix, getUnitDef, getUnitPrefix, getUnitRow, initTypedWasm, irrationalPower, isArray, isBigInt, isBigNumber, isBoolean, isComplex, isDenseMatrix, isDual, isFraction, isFunction, isMatrix, isNull, isNumber, isNumeric, isObject, isRationalScale, isSparseMatrix, isString, isTypedWasmAvailable, isUndefined, isUnit, isUnit$1 as isUnitValue, math, mathTyped, mulberry32, multiplyExactScales, multiplyScalar, namedExactScale, namedIrrationalScale, neumaierCumsum, neumaierSum, norm2, number, pairwiseDot, pairwiseSum, pow, powerExactScale, ratioExactScale, readScaleExpression, readUnitScale, registerNativeTypes, registry, round, rowMajorStrides, scaledDistance, subtractScalar, sumSquaredDeviations, toSiDimensionVector, toSiDimensions, typed, unitPrefixExactScale, unitRowExactOffset, unitRowExactScale, unitRowValue };
|
package/dist/internal.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as DEFAULT_CONFIG, $t as isInteger, An as isNumber, At as deepStrictEqual, Bt as endsWith, Cn as isDenseMatrix, Ct as sortFactories, Dn as isMap, Dt as clone, En as isIndex, Et as canDefineProperty, Fn as isString, Ft as mapObject, Gt as asinh, Ht as memoize, In as isUndefined, It as pick, Jt as copysign, Kt as atanh, Ln as isUnit, Lt as pickShallow, Mn as isRange, Mt as get, Nn as isRegExp, Nt as isLegacyFactory, On as isMatrix, Ot as deepExtend, Pn as isSparseMatrix, Pt as lazy, Qt as format, Rn as typeOf, Rt as set, Sn as isDate, St as isOptionalDependency, Tn as isFunction, Tt as MathjsError, Ut as warnOnce, Vt as hasOwnProperty, Wt as acosh, Xt as digits, Yt as cosh, Zt as expm1, _n as isBigInt, an as normalizeFormatOptions, bn as isCollection, bt as factory, cn as sign, dn as tanh, en as isPowZeroAtInfinity, fn as toEngineering, gn as isArray, hn as toPrecision, in as nearlyEqual, jn as isObject, jt as extend, kn as isNull, kt as deepFlatten, ln as sinh, mn as toFixed, n as unitDependencies, nn as log1p, on as roundDigits, pn as toExponential, qt as cbrt, r as createUnitClass, rn as log2, sn as safeNumberType, t as Unit, tn as log10, un as splitNumber, vn as isBigNumber, vt as assertDependencies, wn as isFraction, wt as stripOptionalNotation, xn as isComplex, xt as isFactory, yn as isBoolean, yt as create, zt as traverse } from "./unit-
|
|
1
|
+
import { $ as DEFAULT_CONFIG, $t as isInteger, An as isNumber, At as deepStrictEqual, Bt as endsWith, Cn as isDenseMatrix, Ct as sortFactories, Dn as isMap, Dt as clone, En as isIndex, Et as canDefineProperty, Fn as isString, Ft as mapObject, Gt as asinh, Ht as memoize, In as isUndefined, It as pick, Jt as copysign, Kt as atanh, Ln as isUnit, Lt as pickShallow, Mn as isRange, Mt as get, Nn as isRegExp, Nt as isLegacyFactory, On as isMatrix, Ot as deepExtend, Pn as isSparseMatrix, Pt as lazy, Qt as format, Rn as typeOf, Rt as set, Sn as isDate, St as isOptionalDependency, Tn as isFunction, Tt as MathjsError, Ut as warnOnce, Vt as hasOwnProperty, Wt as acosh, Xt as digits, Yt as cosh, Zt as expm1, _n as isBigInt, an as normalizeFormatOptions, bn as isCollection, bt as factory, cn as sign, dn as tanh, en as isPowZeroAtInfinity, fn as toEngineering, gn as isArray, hn as toPrecision, in as nearlyEqual, jn as isObject, jt as extend, kn as isNull, kt as deepFlatten, ln as sinh, mn as toFixed, n as unitDependencies, nn as log1p, on as roundDigits, pn as toExponential, qt as cbrt, r as createUnitClass, rn as log2, sn as safeNumberType, t as Unit, tn as log10, un as splitNumber, vn as isBigNumber, vt as assertDependencies, wn as isFraction, wt as stripOptionalNotation, xn as isComplex, xt as isFactory, yn as isBoolean, yt as create, zt as traverse } from "./unit-C6a_xdbr.js";
|
|
2
2
|
//#region src/error/DimensionError.ts
|
|
3
3
|
var DimensionError = class DimensionError extends RangeError {
|
|
4
4
|
actual;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Unit.d.ts","sourceRoot":"","sources":["../../../src/types/unit/Unit.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAeV,eAAe,EAQhB,MAAM,iBAAiB,CAAC;AAmJzB,eAAO,MAAM,eAAe,
|
|
1
|
+
{"version":3,"file":"Unit.d.ts","sourceRoot":"","sources":["../../../src/types/unit/Unit.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAeV,eAAe,EAQhB,MAAM,iBAAiB,CAAC;AAmJzB,eAAO,MAAM,eAAe,6DAo6F3B,CAAC"}
|
|
@@ -4439,6 +4439,9 @@ const createUnitClass = /* #__PURE__ */ factory("Unit", [
|
|
|
4439
4439
|
return toFind;
|
|
4440
4440
|
} else return null;
|
|
4441
4441
|
}
|
|
4442
|
+
function parseProduct() {
|
|
4443
|
+
return parseCharacter("*") !== null || parseCharacter("·") !== null;
|
|
4444
|
+
}
|
|
4442
4445
|
function findUnitPair(name) {
|
|
4443
4446
|
return _findUnit(name);
|
|
4444
4447
|
}
|
|
@@ -4555,7 +4558,7 @@ const createUnitClass = /* #__PURE__ */ factory("Unit", [
|
|
|
4555
4558
|
}
|
|
4556
4559
|
else value = parseFloat(valueStr);
|
|
4557
4560
|
skipWhitespace();
|
|
4558
|
-
if (
|
|
4561
|
+
if (parseProduct()) {
|
|
4559
4562
|
valueProduct = true;
|
|
4560
4563
|
powerMultiplierCurrent = 1;
|
|
4561
4564
|
expectingUnit = true;
|
|
@@ -4636,7 +4639,7 @@ const createUnitClass = /* #__PURE__ */ factory("Unit", [
|
|
|
4636
4639
|
skipWhitespace();
|
|
4637
4640
|
}
|
|
4638
4641
|
expectingUnit = false;
|
|
4639
|
-
if (
|
|
4642
|
+
if (parseProduct()) {
|
|
4640
4643
|
powerMultiplierCurrent = inDenominator ? -1 : 1;
|
|
4641
4644
|
expectingUnit = true;
|
|
4642
4645
|
} else if (parseCharacter("/")) {
|