@danielsimonjr/mathts-functions 0.13.3 → 0.14.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.
@@ -0,0 +1,11 @@
1
+ import type { ConfigOptions } from './core/config.js';
2
+ /**
3
+ * Read or update the global MathTS runtime config. Call with no argument to
4
+ * read the current config; pass a partial to merge it (in place) and get the
5
+ * updated copy back. mathjs-compatible `math.config(...)`.
6
+ *
7
+ * Note: the MathTS functions surface is a singleton, so config is process-global
8
+ * (not per-instance like mathjs `create()`).
9
+ */
10
+ export declare function config(options?: Partial<ConfigOptions>): ConfigOptions;
11
+ //# sourceMappingURL=config-api.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config-api.d.ts","sourceRoot":"","sources":["../src/config-api.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEtD;;;;;;;GAOG;AACH,wBAAgB,MAAM,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,GAAG,aAAa,CAItE"}
package/dist/index.d.ts CHANGED
@@ -11,6 +11,7 @@
11
11
  export * from './typed/index.js';
12
12
  export * from './typed/cas.js';
13
13
  export * from './factories/index.js';
14
+ export { config } from './config-api.js';
14
15
  export { to, toBest } from './typed/unit.js';
15
16
  export { evaluate, compileExpr, parse, parser, reviver, replacer } from './factories/evaluate.js';
16
17
  export { help } from './help.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,cAAc,kBAAkB,CAAC;AAKjC,cAAc,gBAAgB,CAAC;AAG/B,cAAc,sBAAsB,CAAC;AAOrC,OAAO,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAG7C,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,QAA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uB,CAAC;AAG1E,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,YAAY,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAG9D,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC1F,YAAY,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAGxE,OAAO,EAAE,MAAM,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AACnE,YAAY,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAG1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAGxD,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAGxF,OAAO,EACL,SAAS,EACT,eAAe,EACf,KAAK,EACL,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,EACnB,uBAAuB,EACvB,gBAAgB,EAChB,0BAA0B,GAC3B,MAAM,qBAAqB,CAAC"}
package/dist/index.js CHANGED
@@ -17242,9 +17242,9 @@ var createExpm1 = /* @__PURE__ */ factory(
17242
17242
  );
17243
17243
 
17244
17244
  // src/utils/bigint.ts
17245
- function promoteLogarithm(log162, numberLog, config, cplx) {
17245
+ function promoteLogarithm(log162, numberLog, config2, cplx) {
17246
17246
  return function(b) {
17247
- if (b > 0 || config.predictable) {
17247
+ if (b > 0 || config2.predictable) {
17248
17248
  if (b <= 0) return NaN;
17249
17249
  const s = b.toString(16);
17250
17250
  const s15 = s.substring(0, 15);
@@ -17261,7 +17261,7 @@ var log16 = log10Number(16);
17261
17261
  var createLog10 = /* @__PURE__ */ factory(
17262
17262
  name6,
17263
17263
  dependencies6,
17264
- ({ typed: typed3, config, Complex: Complex12 }) => {
17264
+ ({ typed: typed3, config: config2, Complex: Complex12 }) => {
17265
17265
  function complexLog(c) {
17266
17266
  return c.log().div(Math.LN10);
17267
17267
  }
@@ -17270,16 +17270,16 @@ var createLog10 = /* @__PURE__ */ factory(
17270
17270
  }
17271
17271
  return typed3(name6, {
17272
17272
  number: function(x) {
17273
- if (x >= 0 || config.predictable) {
17273
+ if (x >= 0 || config2.predictable) {
17274
17274
  return log10Number(x);
17275
17275
  } else {
17276
17276
  return complexLogNumber(x);
17277
17277
  }
17278
17278
  },
17279
- bigint: promoteLogarithm(log16, log10Number, config, complexLogNumber),
17279
+ bigint: promoteLogarithm(log16, log10Number, config2, complexLogNumber),
17280
17280
  Complex: complexLog,
17281
17281
  BigNumber: function(x) {
17282
- if (!x.isNegative() || config.predictable) {
17282
+ if (!x.isNegative() || config2.predictable) {
17283
17283
  return x.log();
17284
17284
  } else {
17285
17285
  return complexLogNumber(x.toNumber());
@@ -17298,22 +17298,22 @@ var dependencies7 = ["typed", "config", "Complex"];
17298
17298
  var createLog2 = /* @__PURE__ */ factory(
17299
17299
  name7,
17300
17300
  dependencies7,
17301
- ({ typed: typed3, config, Complex: Complex12 }) => {
17301
+ ({ typed: typed3, config: config2, Complex: Complex12 }) => {
17302
17302
  function complexLog2Number(x) {
17303
17303
  return _log2Complex(new Complex12(x, 0));
17304
17304
  }
17305
17305
  return typed3(name7, {
17306
17306
  number: function(x) {
17307
- if (x >= 0 || config.predictable) {
17307
+ if (x >= 0 || config2.predictable) {
17308
17308
  return log2Number(x);
17309
17309
  } else {
17310
17310
  return complexLog2Number(x);
17311
17311
  }
17312
17312
  },
17313
- bigint: promoteLogarithm(4, log2Number, config, complexLog2Number),
17313
+ bigint: promoteLogarithm(4, log2Number, config2, complexLog2Number),
17314
17314
  Complex: _log2Complex,
17315
17315
  BigNumber: function(x) {
17316
- if (!x.isNegative() || config.predictable) {
17316
+ if (!x.isNegative() || config2.predictable) {
17317
17317
  return x.log(2);
17318
17318
  } else {
17319
17319
  return complexLog2Number(x.toNumber());
@@ -17401,14 +17401,14 @@ var dependencies10 = ["config", "typed", "Complex"];
17401
17401
  var createSqrt = /* @__PURE__ */ factory(
17402
17402
  name10,
17403
17403
  dependencies10,
17404
- ({ config, typed: typed3, Complex: Complex12 }) => {
17404
+ ({ config: config2, typed: typed3, Complex: Complex12 }) => {
17405
17405
  return typed3("sqrt", {
17406
17406
  number: _sqrtNumber,
17407
17407
  Complex: function(x) {
17408
17408
  return x.sqrt();
17409
17409
  },
17410
17410
  BigNumber: function(x) {
17411
- if (!x.isNegative() || config.predictable) {
17411
+ if (!x.isNegative() || config2.predictable) {
17412
17412
  return x.sqrt();
17413
17413
  } else {
17414
17414
  return _sqrtNumber(x.toNumber());
@@ -17421,7 +17421,7 @@ var createSqrt = /* @__PURE__ */ factory(
17421
17421
  function _sqrtNumber(x) {
17422
17422
  if (isNaN(x)) {
17423
17423
  return NaN;
17424
- } else if (x >= 0 || config.predictable) {
17424
+ } else if (x >= 0 || config2.predictable) {
17425
17425
  return Math.sqrt(x);
17426
17426
  } else {
17427
17427
  return new Complex12(x, 0).sqrt();
@@ -17504,7 +17504,7 @@ var dependencies13 = ["typed", "config", "?bignumber"];
17504
17504
  var createUnaryMinus = /* @__PURE__ */ factory(
17505
17505
  name13,
17506
17506
  dependencies13,
17507
- ({ typed: typed3, config, bignumber: bignumber2 }) => {
17507
+ ({ typed: typed3, config: config2, bignumber: bignumber2 }) => {
17508
17508
  return typed3(name13, {
17509
17509
  number: unaryMinusNumber,
17510
17510
  "Complex | BigNumber | Fraction": (x) => x.neg(),
@@ -17517,7 +17517,7 @@ var createUnaryMinus = /* @__PURE__ */ factory(
17517
17517
  boolean: function(x) {
17518
17518
  const numValue = x ? 1 : 0;
17519
17519
  const negValue = -numValue;
17520
- const numberType = config?.number || "number";
17520
+ const numberType = config2?.number || "number";
17521
17521
  switch (numberType) {
17522
17522
  case "BigNumber":
17523
17523
  if (!bignumber2) {
@@ -18552,8 +18552,8 @@ var dependencies30 = ["typed", "config", "?on"];
18552
18552
  var createPickRandom = /* @__PURE__ */ factory(
18553
18553
  name30,
18554
18554
  dependencies30,
18555
- ({ typed: typed3, config, on }) => {
18556
- let rng = createRng(config.randomSeed);
18555
+ ({ typed: typed3, config: config2, on }) => {
18556
+ let rng = createRng(config2.randomSeed);
18557
18557
  if (on) {
18558
18558
  on("config", function(curr, prev) {
18559
18559
  if (curr.randomSeed !== prev.randomSeed) {
@@ -18653,8 +18653,8 @@ var dependencies31 = ["typed", "config", "?on"];
18653
18653
  var createRandom = /* @__PURE__ */ factory(
18654
18654
  name31,
18655
18655
  dependencies31,
18656
- ({ typed: typed3, config, on }) => {
18657
- let rng = createRng(config.randomSeed);
18656
+ ({ typed: typed3, config: config2, on }) => {
18657
+ let rng = createRng(config2.randomSeed);
18658
18658
  if (on) {
18659
18659
  on("config", function(curr, prev) {
18660
18660
  if (curr.randomSeed !== prev.randomSeed) {
@@ -18733,7 +18733,7 @@ var dependencies32 = ["typed", "config"];
18733
18733
  var createEqualScalar = /* @__PURE__ */ factory(
18734
18734
  name32,
18735
18735
  dependencies32,
18736
- ({ typed: typed3, config }) => {
18736
+ ({ typed: typed3, config: config2 }) => {
18737
18737
  const compareUnits2 = createCompareUnits({ typed: typed3 });
18738
18738
  return typed3(
18739
18739
  name32,
@@ -18742,10 +18742,10 @@ var createEqualScalar = /* @__PURE__ */ factory(
18742
18742
  return x === y;
18743
18743
  },
18744
18744
  "number, number": function(x, y) {
18745
- return nearlyEqual(x, y, config.relTol, config.absTol);
18745
+ return nearlyEqual(x, y, config2.relTol, config2.absTol);
18746
18746
  },
18747
18747
  "BigNumber, BigNumber": function(x, y) {
18748
- return x.eq(y) || nearlyEqual2(x, y, config.relTol, config.absTol);
18748
+ return x.eq(y) || nearlyEqual2(x, y, config2.relTol, config2.absTol);
18749
18749
  },
18750
18750
  "bigint, bigint": function(x, y) {
18751
18751
  return x === y;
@@ -18754,7 +18754,7 @@ var createEqualScalar = /* @__PURE__ */ factory(
18754
18754
  return x.equals(y);
18755
18755
  },
18756
18756
  "Complex, Complex": function(x, y) {
18757
- return complexEquals(x, y, config.relTol, config.absTol);
18757
+ return complexEquals(x, y, config2.relTol, config2.absTol);
18758
18758
  }
18759
18759
  },
18760
18760
  compareUnits2
@@ -18959,10 +18959,10 @@ var dependencies36 = ["typed", "config", "Complex"];
18959
18959
  var createAcos = /* @__PURE__ */ factory(
18960
18960
  name36,
18961
18961
  dependencies36,
18962
- ({ typed: typed3, config, Complex: Complex12 }) => {
18962
+ ({ typed: typed3, config: config2, Complex: Complex12 }) => {
18963
18963
  return typed3(name36, {
18964
18964
  number: function(x) {
18965
- if (x >= -1 && x <= 1 || config.predictable) {
18965
+ if (x >= -1 && x <= 1 || config2.predictable) {
18966
18966
  return Math.acos(x);
18967
18967
  } else {
18968
18968
  return new Complex12(x, 0).acos();
@@ -18984,10 +18984,10 @@ var dependencies37 = ["typed", "config", "Complex"];
18984
18984
  var createAcosh = /* @__PURE__ */ factory(
18985
18985
  name37,
18986
18986
  dependencies37,
18987
- ({ typed: typed3, config, Complex: Complex12 }) => {
18987
+ ({ typed: typed3, config: config2, Complex: Complex12 }) => {
18988
18988
  return typed3(name37, {
18989
18989
  number: function(x) {
18990
- if (x >= 1 || config.predictable) {
18990
+ if (x >= 1 || config2.predictable) {
18991
18991
  return acoshNumber(x);
18992
18992
  }
18993
18993
  if (x <= -1) {
@@ -19030,10 +19030,10 @@ var dependencies39 = ["typed", "config", "Complex", "BigNumber"];
19030
19030
  var createAcoth = /* @__PURE__ */ factory(
19031
19031
  name39,
19032
19032
  dependencies39,
19033
- ({ typed: typed3, config, Complex: Complex12, BigNumber: BigNumber9 }) => {
19033
+ ({ typed: typed3, config: config2, Complex: Complex12, BigNumber: BigNumber9 }) => {
19034
19034
  return typed3(name39, {
19035
19035
  number: function(x) {
19036
- if (x >= 1 || x <= -1 || config.predictable) {
19036
+ if (x >= 1 || x <= -1 || config2.predictable) {
19037
19037
  return acothNumber(x);
19038
19038
  }
19039
19039
  return new Complex12(x, 0).acoth();
@@ -19054,10 +19054,10 @@ var dependencies40 = ["typed", "config", "Complex", "BigNumber"];
19054
19054
  var createAcsc = /* @__PURE__ */ factory(
19055
19055
  name40,
19056
19056
  dependencies40,
19057
- ({ typed: typed3, config, Complex: Complex12, BigNumber: BigNumber9 }) => {
19057
+ ({ typed: typed3, config: config2, Complex: Complex12, BigNumber: BigNumber9 }) => {
19058
19058
  return typed3(name40, {
19059
19059
  number: function(x) {
19060
- if (x <= -1 || x >= 1 || config.predictable) {
19060
+ if (x <= -1 || x >= 1 || config2.predictable) {
19061
19061
  return acscNumber(x);
19062
19062
  }
19063
19063
  return new Complex12(x, 0).acsc();
@@ -19097,10 +19097,10 @@ var dependencies42 = ["typed", "config", "Complex", "BigNumber"];
19097
19097
  var createAsec = /* @__PURE__ */ factory(
19098
19098
  name42,
19099
19099
  dependencies42,
19100
- ({ typed: typed3, config, Complex: Complex12, BigNumber: BigNumber9 }) => {
19100
+ ({ typed: typed3, config: config2, Complex: Complex12, BigNumber: BigNumber9 }) => {
19101
19101
  return typed3(name42, {
19102
19102
  number: function(x) {
19103
- if (x <= -1 || x >= 1 || config.predictable) {
19103
+ if (x <= -1 || x >= 1 || config2.predictable) {
19104
19104
  return asecNumber(x);
19105
19105
  }
19106
19106
  return new Complex12(x, 0).asec();
@@ -19121,12 +19121,12 @@ var dependencies43 = ["typed", "config", "Complex", "BigNumber"];
19121
19121
  var createAsech = /* @__PURE__ */ factory(
19122
19122
  name43,
19123
19123
  dependencies43,
19124
- ({ typed: typed3, config, Complex: Complex12, BigNumber: BigNumber9 }) => {
19124
+ ({ typed: typed3, config: config2, Complex: Complex12, BigNumber: BigNumber9 }) => {
19125
19125
  return typed3(name43, {
19126
19126
  number: function(x) {
19127
- if (x <= 1 && x >= -1 || config.predictable) {
19127
+ if (x <= 1 && x >= -1 || config2.predictable) {
19128
19128
  const xInv = 1 / x;
19129
- if (xInv > 0 || config.predictable) {
19129
+ if (xInv > 0 || config2.predictable) {
19130
19130
  return asechNumber(x);
19131
19131
  }
19132
19132
  const ret = Math.sqrt(xInv * xInv - 1);
@@ -19150,10 +19150,10 @@ var dependencies44 = ["typed", "config", "Complex"];
19150
19150
  var createAsin = /* @__PURE__ */ factory(
19151
19151
  name44,
19152
19152
  dependencies44,
19153
- ({ typed: typed3, config, Complex: Complex12 }) => {
19153
+ ({ typed: typed3, config: config2, Complex: Complex12 }) => {
19154
19154
  return typed3(name44, {
19155
19155
  number: function(x) {
19156
- if (x >= -1 && x <= 1 || config.predictable) {
19156
+ if (x >= -1 && x <= 1 || config2.predictable) {
19157
19157
  return Math.asin(x);
19158
19158
  } else {
19159
19159
  return new Complex12(x, 0).asin();
@@ -19215,10 +19215,10 @@ var dependencies47 = ["typed", "config", "Complex"];
19215
19215
  var createAtanh = /* @__PURE__ */ factory(
19216
19216
  name47,
19217
19217
  dependencies47,
19218
- ({ typed: typed3, config, Complex: Complex12 }) => {
19218
+ ({ typed: typed3, config: config2, Complex: Complex12 }) => {
19219
19219
  return typed3(name47, {
19220
19220
  number: function(x) {
19221
- if (x <= 1 && x >= -1 || config.predictable) {
19221
+ if (x <= 1 && x >= -1 || config2.predictable) {
19222
19222
  return atanhNumber(x);
19223
19223
  }
19224
19224
  return new Complex12(x, 0).atanh();
@@ -19544,10 +19544,10 @@ var dependencies64 = ["typed", "config"];
19544
19544
  var createIsNegative = /* @__PURE__ */ factory(
19545
19545
  name64,
19546
19546
  dependencies64,
19547
- ({ typed: typed3, config }) => {
19547
+ ({ typed: typed3, config: config2 }) => {
19548
19548
  return typed3(name64, {
19549
- number: (x) => nearlyEqual(x, 0, config.relTol, config.absTol) ? false : isNegativeNumber(x),
19550
- BigNumber: (x) => nearlyEqual2(x, new x.constructor(0), config.relTol, config.absTol) ? false : x.isNeg() && !x.isZero() && !x.isNaN(),
19549
+ number: (x) => nearlyEqual(x, 0, config2.relTol, config2.absTol) ? false : isNegativeNumber(x),
19550
+ BigNumber: (x) => nearlyEqual2(x, new x.constructor(0), config2.relTol, config2.absTol) ? false : x.isNeg() && !x.isZero() && !x.isNaN(),
19551
19551
  bigint: (x) => x < 0n,
19552
19552
  Fraction: (x) => x.s < 0n,
19553
19553
  // It's enough to decide on the sign
@@ -19584,10 +19584,10 @@ var dependencies66 = ["typed", "config"];
19584
19584
  var createIsPositive = /* @__PURE__ */ factory(
19585
19585
  name66,
19586
19586
  dependencies66,
19587
- ({ typed: typed3, config }) => {
19587
+ ({ typed: typed3, config: config2 }) => {
19588
19588
  return typed3(name66, {
19589
- number: (x) => nearlyEqual(x, 0, config.relTol, config.absTol) ? false : isPositiveNumber(x),
19590
- BigNumber: (x) => nearlyEqual2(x, new x.constructor(0), config.relTol, config.absTol) ? false : !x.isNeg() && !x.isZero() && !x.isNaN(),
19589
+ number: (x) => nearlyEqual(x, 0, config2.relTol, config2.absTol) ? false : isPositiveNumber(x),
19590
+ BigNumber: (x) => nearlyEqual2(x, new x.constructor(0), config2.relTol, config2.absTol) ? false : !x.isNeg() && !x.isZero() && !x.isNaN(),
19591
19591
  bigint: (x) => x > 0n,
19592
19592
  Fraction: (x) => x.s > 0n && x.n > 0n,
19593
19593
  Unit: typed3.referToSelf(
@@ -19806,7 +19806,7 @@ var dependencies71 = ["typed", "config", "numeric"];
19806
19806
  var createUnaryPlus = /* @__PURE__ */ factory(
19807
19807
  name71,
19808
19808
  dependencies71,
19809
- ({ typed: typed3, config, numeric: numeric2 }) => {
19809
+ ({ typed: typed3, config: config2, numeric: numeric2 }) => {
19810
19810
  return typed3(name71, {
19811
19811
  number: unaryPlusNumber,
19812
19812
  Complex: function(x) {
@@ -19829,10 +19829,10 @@ var createUnaryPlus = /* @__PURE__ */ factory(
19829
19829
  (self) => (x) => deepMap2(x, self, true)
19830
19830
  ),
19831
19831
  boolean: function(x) {
19832
- return numeric2(x ? 1 : 0, config.number);
19832
+ return numeric2(x ? 1 : 0, config2.number);
19833
19833
  },
19834
19834
  string: function(x) {
19835
- return numeric2(x, safeNumberType(x, config));
19835
+ return numeric2(x, safeNumberType(x, config2));
19836
19836
  }
19837
19837
  });
19838
19838
  }
@@ -19962,8 +19962,8 @@ var dependencies73 = ["typed", "config", "log2", "?on"];
19962
19962
  var createRandomInt = /* @__PURE__ */ factory(
19963
19963
  name73,
19964
19964
  dependencies73,
19965
- ({ typed: typed3, config, log2: log23, on }) => {
19966
- let rng = createRng(config.randomSeed);
19965
+ ({ typed: typed3, config: config2, log2: log23, on }) => {
19966
+ let rng = createRng(config2.randomSeed);
19967
19967
  if (on) {
19968
19968
  on("config", function(curr, prev) {
19969
19969
  if (curr.randomSeed !== prev.randomSeed) {
@@ -20255,12 +20255,12 @@ var dependencies82 = ["config", "?bignumber"];
20255
20255
  var createParseNumberWithConfig = /* @__PURE__ */ factory(
20256
20256
  name82,
20257
20257
  dependencies82,
20258
- ({ config, bignumber: bignumber2 }) => {
20258
+ ({ config: config2, bignumber: bignumber2 }) => {
20259
20259
  function parseNumberWithConfig2(str) {
20260
20260
  if (typeof str !== "string") {
20261
20261
  throw new TypeError(`parseNumberWithConfig expects string, got ${typeof str}`);
20262
20262
  }
20263
- const numberType = config.number || "number";
20263
+ const numberType = config2.number || "number";
20264
20264
  switch (numberType) {
20265
20265
  case "BigNumber":
20266
20266
  if (!bignumber2) {
@@ -20475,22 +20475,22 @@ var dependencies85 = ["typed", "config", "matrix", "BigNumber", "DenseMatrix", "
20475
20475
  var createIdentity = /* @__PURE__ */ factory(
20476
20476
  name85,
20477
20477
  dependencies85,
20478
- ({ typed: typed3, config, matrix: matrix2, BigNumber: BigNumber9, DenseMatrix: DenseMatrix6, SparseMatrix }) => {
20478
+ ({ typed: typed3, config: config2, matrix: matrix2, BigNumber: BigNumber9, DenseMatrix: DenseMatrix6, SparseMatrix }) => {
20479
20479
  return typed3(name85, {
20480
20480
  "": function() {
20481
- return config.matrix === "Matrix" ? matrix2([]) : [];
20481
+ return config2.matrix === "Matrix" ? matrix2([]) : [];
20482
20482
  },
20483
20483
  string: function(format6) {
20484
20484
  return matrix2(format6);
20485
20485
  },
20486
20486
  "number | BigNumber": function(rows) {
20487
- return _identity(rows, rows, config.matrix === "Matrix" ? "dense" : void 0);
20487
+ return _identity(rows, rows, config2.matrix === "Matrix" ? "dense" : void 0);
20488
20488
  },
20489
20489
  "number | BigNumber, string": function(rows, format6) {
20490
20490
  return _identity(rows, rows, format6);
20491
20491
  },
20492
20492
  "number | BigNumber, number | BigNumber": function(rows, cols) {
20493
- return _identity(rows, cols, config.matrix === "Matrix" ? "dense" : void 0);
20493
+ return _identity(rows, cols, config2.matrix === "Matrix" ? "dense" : void 0);
20494
20494
  },
20495
20495
  "number | BigNumber, number | BigNumber, string": function(rows, cols, format6) {
20496
20496
  return _identity(rows, cols, format6);
@@ -20553,10 +20553,10 @@ var createIdentity = /* @__PURE__ */ factory(
20553
20553
  );
20554
20554
 
20555
20555
  // src/matrix/utils/zerosAndOnes.ts
20556
- function createZerosAndOnes(name254, defaultValue, { typed: typed3, config, matrix: matrix2, BigNumber: BigNumber9 }) {
20556
+ function createZerosAndOnes(name254, defaultValue, { typed: typed3, config: config2, matrix: matrix2, BigNumber: BigNumber9 }) {
20557
20557
  return typed3(name254, {
20558
20558
  "": function() {
20559
- return config.matrix === "Array" ? _zerosAndOnes([]) : _zerosAndOnes([], "default");
20559
+ return config2.matrix === "Array" ? _zerosAndOnes([]) : _zerosAndOnes([], "default");
20560
20560
  },
20561
20561
  // math.zeros/ones(m, n, p, ..., format)
20562
20562
  // TODO: more accurate signature '...number | BigNumber, string' as soon as typed-function supports this
@@ -20565,7 +20565,7 @@ function createZerosAndOnes(name254, defaultValue, { typed: typed3, config, matr
20565
20565
  if (typeof last === "string") {
20566
20566
  const format6 = size2.pop();
20567
20567
  return _zerosAndOnes(size2, format6);
20568
- } else if (config.matrix === "Array") {
20568
+ } else if (config2.matrix === "Array") {
20569
20569
  return _zerosAndOnes(size2);
20570
20570
  } else {
20571
20571
  return _zerosAndOnes(size2, "default");
@@ -23045,7 +23045,7 @@ var createCbrt = /* @__PURE__ */ factory(
23045
23045
  name105,
23046
23046
  dependencies105,
23047
23047
  ({
23048
- config,
23048
+ config: config2,
23049
23049
  typed: typed3,
23050
23050
  isNegative: isNegative2,
23051
23051
  unaryMinus: unaryMinus2,
@@ -23081,7 +23081,7 @@ var createCbrt = /* @__PURE__ */ factory(
23081
23081
  new Complex12(cbrtNumber(abs2), 0).mul(new Complex12(0, arg3 + Math.PI * 2 / 3).exp()),
23082
23082
  new Complex12(cbrtNumber(abs2), 0).mul(new Complex12(0, arg3 - Math.PI * 2 / 3).exp())
23083
23083
  ];
23084
- return config.matrix === "Array" ? all : matrix2(all);
23084
+ return config2.matrix === "Array" ? all : matrix2(all);
23085
23085
  } else {
23086
23086
  return principal;
23087
23087
  }
@@ -23357,7 +23357,7 @@ var dependencies110 = [
23357
23357
  var createRound = /* @__PURE__ */ factory(
23358
23358
  name110,
23359
23359
  dependencies110,
23360
- ({ typed: typed3, config, matrix: matrix2, equalScalar: equalScalar3, zeros: zeros2, BigNumber: BigNumber9, DenseMatrix: DenseMatrix6 }) => {
23360
+ ({ typed: typed3, config: config2, matrix: matrix2, equalScalar: equalScalar3, zeros: zeros2, BigNumber: BigNumber9, DenseMatrix: DenseMatrix6 }) => {
23361
23361
  const matAlgo11xS0s = createMatAlgo11xS0s({ typed: typed3, equalScalar: equalScalar3 });
23362
23362
  const matAlgo12xSfs = createMatAlgo12xSfs({ typed: typed3, DenseMatrix: DenseMatrix6 });
23363
23363
  const matAlgo14xDs = createMatAlgo14xDs({ typed: typed3 });
@@ -23366,17 +23366,17 @@ var createRound = /* @__PURE__ */ factory(
23366
23366
  }
23367
23367
  return typed3(name110, {
23368
23368
  number: function(x) {
23369
- const xEpsilon = roundNumber(x, toExponent(config.relTol));
23370
- const xSelected = nearlyEqual(x, xEpsilon, config.relTol, config.absTol) ? xEpsilon : x;
23369
+ const xEpsilon = roundNumber(x, toExponent(config2.relTol));
23370
+ const xSelected = nearlyEqual(x, xEpsilon, config2.relTol, config2.absTol) ? xEpsilon : x;
23371
23371
  return roundNumber(xSelected);
23372
23372
  },
23373
23373
  "number, number": function(x, n) {
23374
- const epsilonExponent = toExponent(config.relTol);
23374
+ const epsilonExponent = toExponent(config2.relTol);
23375
23375
  if (n >= epsilonExponent) {
23376
23376
  return roundNumber(x, n);
23377
23377
  }
23378
23378
  const xEpsilon = roundNumber(x, epsilonExponent);
23379
- const xSelected = nearlyEqual(x, xEpsilon, config.relTol, config.absTol) ? xEpsilon : x;
23379
+ const xSelected = nearlyEqual(x, xEpsilon, config2.relTol, config2.absTol) ? xEpsilon : x;
23380
23380
  return roundNumber(xSelected, n);
23381
23381
  },
23382
23382
  "number, BigNumber": function(x, n) {
@@ -23402,20 +23402,20 @@ var createRound = /* @__PURE__ */ factory(
23402
23402
  return x.round(_n);
23403
23403
  },
23404
23404
  BigNumber: function(x) {
23405
- const xEpsilon = new BigNumber9(x).toDecimalPlaces(toExponent(config.relTol));
23406
- const xSelected = nearlyEqual2(x, xEpsilon, config.relTol, config.absTol) ? xEpsilon : x;
23405
+ const xEpsilon = new BigNumber9(x).toDecimalPlaces(toExponent(config2.relTol));
23406
+ const xSelected = nearlyEqual2(x, xEpsilon, config2.relTol, config2.absTol) ? xEpsilon : x;
23407
23407
  return xSelected.toDecimalPlaces(0);
23408
23408
  },
23409
23409
  "BigNumber, BigNumber": function(x, n) {
23410
23410
  if (!n.isInteger()) {
23411
23411
  throw new TypeError(NO_INT);
23412
23412
  }
23413
- const epsilonExponent = toExponent(config.relTol);
23413
+ const epsilonExponent = toExponent(config2.relTol);
23414
23414
  if (n >= epsilonExponent) {
23415
23415
  return x.toDecimalPlaces(n.toNumber());
23416
23416
  }
23417
23417
  const xEpsilon = x.toDecimalPlaces(epsilonExponent);
23418
- const xSelected = nearlyEqual2(x, xEpsilon, config.relTol, config.absTol) ? xEpsilon : x;
23418
+ const xSelected = nearlyEqual2(x, xEpsilon, config2.relTol, config2.absTol) ? xEpsilon : x;
23419
23419
  return xSelected.toDecimalPlaces(n.toNumber());
23420
23420
  },
23421
23421
  // bigints can't be rounded
@@ -23505,11 +23505,11 @@ var dependencies111 = ["typed", "config", "matrix", "BigNumber"];
23505
23505
  var createXgcd = /* @__PURE__ */ factory(
23506
23506
  name111,
23507
23507
  dependencies111,
23508
- ({ typed: typed3, config, matrix: matrix2, BigNumber: BigNumber9 }) => {
23508
+ ({ typed: typed3, config: config2, matrix: matrix2, BigNumber: BigNumber9 }) => {
23509
23509
  return typed3(name111, {
23510
23510
  "number, number": function(a, b) {
23511
23511
  const res = xgcdNumber(a, b);
23512
- return config.matrix === "Array" ? res : matrix2(res);
23512
+ return config2.matrix === "Array" ? res : matrix2(res);
23513
23513
  },
23514
23514
  "BigNumber, BigNumber": _xgcdBigNumber
23515
23515
  // TODO: implement support for Fraction
@@ -23545,7 +23545,7 @@ var createXgcd = /* @__PURE__ */ factory(
23545
23545
  } else {
23546
23546
  res = [a, !a.isZero() ? lastx : 0, lasty];
23547
23547
  }
23548
- return config.matrix === "Array" ? res : matrix2(res);
23548
+ return config2.matrix === "Array" ? res : matrix2(res);
23549
23549
  }
23550
23550
  }
23551
23551
  );
@@ -23557,7 +23557,7 @@ var nlg16 = Math.log(16);
23557
23557
  var createLog = /* @__PURE__ */ factory(
23558
23558
  name112,
23559
23559
  dependencies112,
23560
- ({ typed: typed3, typeOf: typeOf3, config, divideScalar: divideScalar2, Complex: Complex12 }) => {
23560
+ ({ typed: typed3, typeOf: typeOf3, config: config2, divideScalar: divideScalar2, Complex: Complex12 }) => {
23561
23561
  function complexLog(c) {
23562
23562
  return c.log();
23563
23563
  }
@@ -23566,16 +23566,16 @@ var createLog = /* @__PURE__ */ factory(
23566
23566
  }
23567
23567
  return typed3(name112, {
23568
23568
  number: function(x) {
23569
- if (x >= 0 || config.predictable) {
23569
+ if (x >= 0 || config2.predictable) {
23570
23570
  return logNumber(x);
23571
23571
  } else {
23572
23572
  return complexLogNumber(x);
23573
23573
  }
23574
23574
  },
23575
- bigint: promoteLogarithm(nlg16, logNumber, config, complexLogNumber),
23575
+ bigint: promoteLogarithm(nlg16, logNumber, config2, complexLogNumber),
23576
23576
  Complex: complexLog,
23577
23577
  BigNumber: function(x) {
23578
- if (!x.isNegative() || config.predictable) {
23578
+ if (!x.isNegative() || config2.predictable) {
23579
23579
  return x.ln();
23580
23580
  } else {
23581
23581
  return complexLogNumber(x.toNumber());
@@ -23963,7 +23963,7 @@ var dependencies117 = ["typed", "config", "matrix"];
23963
23963
  var createResize = /* @__PURE__ */ factory(
23964
23964
  name117,
23965
23965
  dependencies117,
23966
- ({ typed: typed3, config, matrix: matrix2 }) => {
23966
+ ({ typed: typed3, config: config2, matrix: matrix2 }) => {
23967
23967
  return typed3(name117, {
23968
23968
  "any, Array | Matrix": function(x, size2) {
23969
23969
  return _resize2(x, size2);
@@ -23985,7 +23985,7 @@ var createResize = /* @__PURE__ */ factory(
23985
23985
  if (typeof x === "string") {
23986
23986
  return _resizeString(x, sz, defaultValue);
23987
23987
  }
23988
- const asMatrix = Array.isArray(x) ? false : config.matrix !== "Array";
23988
+ const asMatrix = Array.isArray(x) ? false : config2.matrix !== "Array";
23989
23989
  if (sz.length === 0) {
23990
23990
  let scalar = x;
23991
23991
  while (Array.isArray(scalar)) {
@@ -24284,7 +24284,7 @@ var createBernoulli = /* @__PURE__ */ factory(
24284
24284
  dependencies119,
24285
24285
  ({
24286
24286
  typed: typed3,
24287
- config,
24287
+ config: config2,
24288
24288
  isInteger: _isInteger,
24289
24289
  number: number2,
24290
24290
  BigNumber: BigNumber9,
@@ -24312,9 +24312,9 @@ var createBernoulli = /* @__PURE__ */ factory(
24312
24312
  (a, b) => a.div(b)
24313
24313
  ),
24314
24314
  BigNumber: (index) => {
24315
- if (config.precision !== cachedPrecision) {
24315
+ if (config2.precision !== cachedPrecision) {
24316
24316
  bigCache = [void 0];
24317
- cachedPrecision = config.precision;
24317
+ cachedPrecision = config2.precision;
24318
24318
  }
24319
24319
  return _bernoulli(
24320
24320
  number2(index),
@@ -25019,7 +25019,7 @@ var dependencies128 = ["typed", "config", "add", "numeric", "parseNumberWithConf
25019
25019
  var createSum = /* @__PURE__ */ factory(
25020
25020
  name128,
25021
25021
  dependencies128,
25022
- ({ typed: typed3, config, add: add2, numeric: numeric2, parseNumberWithConfig: parseNumberWithConfig2 }) => {
25022
+ ({ typed: typed3, config: config2, add: add2, numeric: numeric2, parseNumberWithConfig: parseNumberWithConfig2 }) => {
25023
25023
  return typed3(name128, {
25024
25024
  // sum(string) - single string input
25025
25025
  string: function(x) {
@@ -25064,7 +25064,7 @@ var createSum = /* @__PURE__ */ factory(
25064
25064
  }
25065
25065
  });
25066
25066
  if (sum3 === void 0) {
25067
- sum3 = numeric2(0, config.number);
25067
+ sum3 = numeric2(0, config2.number);
25068
25068
  }
25069
25069
  return sum3;
25070
25070
  }
@@ -25313,12 +25313,12 @@ var bigTen = new Decimal(10);
25313
25313
  var createFloorNumber = /* @__PURE__ */ factory(
25314
25314
  name133,
25315
25315
  ["typed", "config", "round"],
25316
- ({ typed: typed3, config, round: round2 }) => {
25316
+ ({ typed: typed3, config: config2, round: round2 }) => {
25317
25317
  function _floorNumber(x) {
25318
25318
  const f = Math.floor(x);
25319
25319
  const r = round2(x);
25320
25320
  if (f === r) return f;
25321
- if (nearlyEqual(x, r, config.relTol, config.absTol) && !nearlyEqual(x, f, config.relTol, config.absTol)) {
25321
+ if (nearlyEqual(x, r, config2.relTol, config2.absTol) && !nearlyEqual(x, f, config2.relTol, config2.absTol)) {
25322
25322
  return r;
25323
25323
  }
25324
25324
  return f;
@@ -25341,13 +25341,13 @@ var createFloorNumber = /* @__PURE__ */ factory(
25341
25341
  var createFloor = /* @__PURE__ */ factory(
25342
25342
  name133,
25343
25343
  dependencies133,
25344
- ({ typed: typed3, config, round: round2, matrix: matrix2, equalScalar: equalScalar3, zeros: zeros2, DenseMatrix: DenseMatrix6 }) => {
25344
+ ({ typed: typed3, config: config2, round: round2, matrix: matrix2, equalScalar: equalScalar3, zeros: zeros2, DenseMatrix: DenseMatrix6 }) => {
25345
25345
  const matAlgo11xS0s = createMatAlgo11xS0s({ typed: typed3, equalScalar: equalScalar3 });
25346
25346
  const matAlgo12xSfs = createMatAlgo12xSfs({ typed: typed3, DenseMatrix: DenseMatrix6 });
25347
25347
  const matAlgo14xDs = createMatAlgo14xDs({ typed: typed3 });
25348
- const floorNumber = createFloorNumber({ typed: typed3, config, round: round2 });
25348
+ const floorNumber = createFloorNumber({ typed: typed3, config: config2, round: round2 });
25349
25349
  function _bigFloor(x) {
25350
- const bne = (a, b) => nearlyEqual2(a, b, config.relTol, config.absTol);
25350
+ const bne = (a, b) => nearlyEqual2(a, b, config2.relTol, config2.absTol);
25351
25351
  const f = x.floor();
25352
25352
  const r = round2(x);
25353
25353
  if (f.eq(r)) return f;
@@ -25554,10 +25554,10 @@ var dependencies135 = [
25554
25554
  var createMod = /* @__PURE__ */ factory(
25555
25555
  name135,
25556
25556
  dependencies135,
25557
- ({ typed: typed3, config, round: round2, matrix: matrix2, equalScalar: equalScalar3, zeros: zeros2, DenseMatrix: DenseMatrix6, concat: concat3 }) => {
25557
+ ({ typed: typed3, config: config2, round: round2, matrix: matrix2, equalScalar: equalScalar3, zeros: zeros2, DenseMatrix: DenseMatrix6, concat: concat3 }) => {
25558
25558
  const floor2 = createFloor({
25559
25559
  typed: typed3,
25560
- config,
25560
+ config: config2,
25561
25561
  round: round2,
25562
25562
  matrix: matrix2,
25563
25563
  equalScalar: equalScalar3,
@@ -25855,7 +25855,7 @@ var createGcd = /* @__PURE__ */ factory(
25855
25855
  ({
25856
25856
  typed: typed3,
25857
25857
  matrix: matrix2,
25858
- config,
25858
+ config: config2,
25859
25859
  round: round2,
25860
25860
  equalScalar: equalScalar3,
25861
25861
  zeros: zeros2,
@@ -25865,7 +25865,7 @@ var createGcd = /* @__PURE__ */ factory(
25865
25865
  }) => {
25866
25866
  const mod2 = createMod({
25867
25867
  typed: typed3,
25868
- config,
25868
+ config: config2,
25869
25869
  round: round2,
25870
25870
  matrix: matrix2,
25871
25871
  equalScalar: equalScalar3,
@@ -26122,10 +26122,10 @@ var dependencies142 = ["typed", "config", "divideScalar", "log", "Complex"];
26122
26122
  var createLog1p = /* @__PURE__ */ factory(
26123
26123
  name142,
26124
26124
  dependencies142,
26125
- ({ typed: typed3, config, divideScalar: divideScalar2, log: log3, Complex: Complex12 }) => {
26125
+ ({ typed: typed3, config: config2, divideScalar: divideScalar2, log: log3, Complex: Complex12 }) => {
26126
26126
  return typed3(name142, {
26127
26127
  number: function(x) {
26128
- if (x >= -1 || config.predictable) {
26128
+ if (x >= -1 || config2.predictable) {
26129
26129
  return log1p2(x);
26130
26130
  } else {
26131
26131
  return _log1pComplex(new Complex12(x, 0));
@@ -26134,7 +26134,7 @@ var createLog1p = /* @__PURE__ */ factory(
26134
26134
  Complex: _log1pComplex,
26135
26135
  BigNumber: function(x) {
26136
26136
  const y = x.plus(1);
26137
- if (!y.isNegative() || config.predictable) {
26137
+ if (!y.isNegative() || config2.predictable) {
26138
26138
  return y.ln();
26139
26139
  } else {
26140
26140
  return _log1pComplex(new Complex12(x.toNumber(), 0));
@@ -26296,7 +26296,7 @@ var createPow = /* @__PURE__ */ factory(
26296
26296
  dependencies144,
26297
26297
  ({
26298
26298
  typed: typed3,
26299
- config,
26299
+ config: config2,
26300
26300
  identity: identity2,
26301
26301
  multiply: multiply2,
26302
26302
  matrix: matrix2,
@@ -26311,7 +26311,7 @@ var createPow = /* @__PURE__ */ factory(
26311
26311
  return x.pow(y);
26312
26312
  },
26313
26313
  "BigNumber, BigNumber": function(x, y) {
26314
- if (y.isInteger() || x.gte(0) || config.predictable) {
26314
+ if (y.isInteger() || x.gte(0) || config2.predictable) {
26315
26315
  return x.pow(y);
26316
26316
  } else {
26317
26317
  return new Complex12(x.toNumber(), 0).pow(y.toNumber(), 0);
@@ -26323,7 +26323,7 @@ var createPow = /* @__PURE__ */ factory(
26323
26323
  if (result != null) {
26324
26324
  return result;
26325
26325
  }
26326
- if (config.predictable) {
26326
+ if (config2.predictable) {
26327
26327
  throw new Error("Result of pow is non-rational and cannot be expressed as a fraction");
26328
26328
  } else {
26329
26329
  return _pow(x.valueOf(), y.valueOf());
@@ -26342,7 +26342,7 @@ var createPow = /* @__PURE__ */ factory(
26342
26342
  }
26343
26343
  });
26344
26344
  function _pow(x, y) {
26345
- if (config.predictable && !isInteger(y) && x < 0) {
26345
+ if (config2.predictable && !isInteger(y) && x < 0) {
26346
26346
  try {
26347
26347
  const yFrac = fraction2(y);
26348
26348
  const yNum = number2(yFrac);
@@ -26354,10 +26354,10 @@ var createPow = /* @__PURE__ */ factory(
26354
26354
  } catch {
26355
26355
  }
26356
26356
  }
26357
- if (config.predictable && (x < -1 && y === Infinity || x > -1 && x < 0 && y === -Infinity)) {
26357
+ if (config2.predictable && (x < -1 && y === Infinity || x > -1 && x < 0 && y === -Infinity)) {
26358
26358
  return NaN;
26359
26359
  }
26360
- if (isInteger(y) || x >= 0 || config.predictable) {
26360
+ if (isInteger(y) || x >= 0 || config2.predictable) {
26361
26361
  return powNumber(x, y);
26362
26362
  } else {
26363
26363
  if (isPowZeroAtInfinity(x, y)) {
@@ -26414,12 +26414,12 @@ var bigTen2 = new Decimal2(10);
26414
26414
  var createCeilNumber = /* @__PURE__ */ factory(
26415
26415
  name145,
26416
26416
  ["typed", "config", "round"],
26417
- ({ typed: typed3, config, round: round2 }) => {
26417
+ ({ typed: typed3, config: config2, round: round2 }) => {
26418
26418
  function _ceilNumber(x) {
26419
26419
  const c = Math.ceil(x);
26420
26420
  const r = round2(x);
26421
26421
  if (c === r) return c;
26422
- if (nearlyEqual(x, r, config.relTol, config.absTol) && !nearlyEqual(x, c, config.relTol, config.absTol)) {
26422
+ if (nearlyEqual(x, r, config2.relTol, config2.absTol) && !nearlyEqual(x, c, config2.relTol, config2.absTol)) {
26423
26423
  return r;
26424
26424
  }
26425
26425
  return c;
@@ -26442,13 +26442,13 @@ var createCeilNumber = /* @__PURE__ */ factory(
26442
26442
  var createCeil = /* @__PURE__ */ factory(
26443
26443
  name145,
26444
26444
  dependencies145,
26445
- ({ typed: typed3, config, round: round2, matrix: matrix2, equalScalar: equalScalar3, zeros: zeros2, DenseMatrix: DenseMatrix6 }) => {
26445
+ ({ typed: typed3, config: config2, round: round2, matrix: matrix2, equalScalar: equalScalar3, zeros: zeros2, DenseMatrix: DenseMatrix6 }) => {
26446
26446
  const matAlgo11xS0s = createMatAlgo11xS0s({ typed: typed3, equalScalar: equalScalar3 });
26447
26447
  const matAlgo12xSfs = createMatAlgo12xSfs({ typed: typed3, DenseMatrix: DenseMatrix6 });
26448
26448
  const matAlgo14xDs = createMatAlgo14xDs({ typed: typed3 });
26449
- const ceilNumber = createCeilNumber({ typed: typed3, config, round: round2 });
26449
+ const ceilNumber = createCeilNumber({ typed: typed3, config: config2, round: round2 });
26450
26450
  function _bigCeil(x) {
26451
- const bne = (a, b) => nearlyEqual2(a, b, config.relTol, config.absTol);
26451
+ const bne = (a, b) => nearlyEqual2(a, b, config2.relTol, config2.absTol);
26452
26452
  const c = x.ceil();
26453
26453
  const r = round2(x);
26454
26454
  if (c.eq(r)) return c;
@@ -27054,7 +27054,7 @@ var createCompare = /* @__PURE__ */ factory(
27054
27054
  dependencies155,
27055
27055
  ({
27056
27056
  typed: typed3,
27057
- config,
27057
+ config: config2,
27058
27058
  equalScalar: equalScalar3,
27059
27059
  matrix: matrix2,
27060
27060
  BigNumber: BigNumber9,
@@ -27073,13 +27073,13 @@ var createCompare = /* @__PURE__ */ factory(
27073
27073
  const compareUnits2 = createCompareUnits({ typed: typed3 });
27074
27074
  return typed3(
27075
27075
  name155,
27076
- createCompareNumber({ typed: typed3, config }),
27076
+ createCompareNumber({ typed: typed3, config: config2 }),
27077
27077
  {
27078
27078
  "boolean, boolean": function(x, y) {
27079
27079
  return x === y ? 0 : x > y ? 1 : -1;
27080
27080
  },
27081
27081
  "BigNumber, BigNumber": function(x, y) {
27082
- return nearlyEqual2(x, y, config.relTol, config.absTol) ? new BigNumber9(0) : new BigNumber9(x.cmp(y));
27082
+ return nearlyEqual2(x, y, config2.relTol, config2.absTol) ? new BigNumber9(0) : new BigNumber9(x.cmp(y));
27083
27083
  },
27084
27084
  "bigint, bigint": function(x, y) {
27085
27085
  return x === y ? 0n : x > y ? 1n : -1n;
@@ -27103,10 +27103,10 @@ var createCompare = /* @__PURE__ */ factory(
27103
27103
  var createCompareNumber = /* @__PURE__ */ factory(
27104
27104
  name155,
27105
27105
  ["typed", "config"],
27106
- ({ typed: typed3, config }) => {
27106
+ ({ typed: typed3, config: config2 }) => {
27107
27107
  return typed3(name155, {
27108
27108
  "number, number": function(x, y) {
27109
- return nearlyEqual(x, y, config.relTol, config.absTol) ? 0 : x > y ? 1 : -1;
27109
+ return nearlyEqual(x, y, config2.relTol, config2.absTol) ? 0 : x > y ? 1 : -1;
27110
27110
  }
27111
27111
  });
27112
27112
  }
@@ -27189,7 +27189,7 @@ var dependencies158 = [
27189
27189
  var createLarger = /* @__PURE__ */ factory(
27190
27190
  name158,
27191
27191
  dependencies158,
27192
- ({ typed: typed3, config, bignumber: bignumber2, matrix: matrix2, DenseMatrix: DenseMatrix6, concat: concat3, SparseMatrix }) => {
27192
+ ({ typed: typed3, config: config2, bignumber: bignumber2, matrix: matrix2, DenseMatrix: DenseMatrix6, concat: concat3, SparseMatrix }) => {
27193
27193
  const matAlgo03xDSf = createMatAlgo03xDSf({ typed: typed3 });
27194
27194
  const matAlgo07xSSf = createMatAlgo07xSSf({ typed: typed3, SparseMatrix });
27195
27195
  const matAlgo12xSfs = createMatAlgo12xSfs({ typed: typed3, DenseMatrix: DenseMatrix6 });
@@ -27200,11 +27200,11 @@ var createLarger = /* @__PURE__ */ factory(
27200
27200
  });
27201
27201
  const compareUnits2 = createCompareUnits({ typed: typed3 });
27202
27202
  function bignumLarger(x, y) {
27203
- return x.gt(y) && !nearlyEqual2(x, y, config.relTol, config.absTol);
27203
+ return x.gt(y) && !nearlyEqual2(x, y, config2.relTol, config2.absTol);
27204
27204
  }
27205
27205
  return typed3(
27206
27206
  name158,
27207
- createLargerNumber({ typed: typed3, config }),
27207
+ createLargerNumber({ typed: typed3, config: config2 }),
27208
27208
  {
27209
27209
  "boolean, boolean": (x, y) => x > y,
27210
27210
  "BigNumber, BigNumber": bignumLarger,
@@ -27232,10 +27232,10 @@ var createLarger = /* @__PURE__ */ factory(
27232
27232
  var createLargerNumber = /* @__PURE__ */ factory(
27233
27233
  name158,
27234
27234
  ["typed", "config"],
27235
- ({ typed: typed3, config }) => {
27235
+ ({ typed: typed3, config: config2 }) => {
27236
27236
  return typed3(name158, {
27237
27237
  "number, number": function(x, y) {
27238
- return x > y && !nearlyEqual(x, y, config.relTol, config.absTol);
27238
+ return x > y && !nearlyEqual(x, y, config2.relTol, config2.absTol);
27239
27239
  }
27240
27240
  });
27241
27241
  }
@@ -27247,7 +27247,7 @@ var dependencies159 = ["typed", "config", "matrix", "DenseMatrix", "concat", "Sp
27247
27247
  var createLargerEq = /* @__PURE__ */ factory(
27248
27248
  name159,
27249
27249
  dependencies159,
27250
- ({ typed: typed3, config, matrix: matrix2, DenseMatrix: DenseMatrix6, concat: concat3, SparseMatrix }) => {
27250
+ ({ typed: typed3, config: config2, matrix: matrix2, DenseMatrix: DenseMatrix6, concat: concat3, SparseMatrix }) => {
27251
27251
  const matAlgo03xDSf = createMatAlgo03xDSf({ typed: typed3 });
27252
27252
  const matAlgo07xSSf = createMatAlgo07xSSf({ typed: typed3, SparseMatrix });
27253
27253
  const matAlgo12xSfs = createMatAlgo12xSfs({ typed: typed3, DenseMatrix: DenseMatrix6 });
@@ -27259,11 +27259,11 @@ var createLargerEq = /* @__PURE__ */ factory(
27259
27259
  const compareUnits2 = createCompareUnits({ typed: typed3 });
27260
27260
  return typed3(
27261
27261
  name159,
27262
- createLargerEqNumber({ typed: typed3, config }),
27262
+ createLargerEqNumber({ typed: typed3, config: config2 }),
27263
27263
  {
27264
27264
  "boolean, boolean": (x, y) => x >= y,
27265
27265
  "BigNumber, BigNumber": function(x, y) {
27266
- return x.gte(y) || nearlyEqual2(x, y, config.relTol, config.absTol);
27266
+ return x.gte(y) || nearlyEqual2(x, y, config2.relTol, config2.absTol);
27267
27267
  },
27268
27268
  "bigint, bigint": function(x, y) {
27269
27269
  return x >= y;
@@ -27285,10 +27285,10 @@ var createLargerEq = /* @__PURE__ */ factory(
27285
27285
  var createLargerEqNumber = /* @__PURE__ */ factory(
27286
27286
  name159,
27287
27287
  ["typed", "config"],
27288
- ({ typed: typed3, config }) => {
27288
+ ({ typed: typed3, config: config2 }) => {
27289
27289
  return typed3(name159, {
27290
27290
  "number, number": function(x, y) {
27291
- return x >= y || nearlyEqual(x, y, config.relTol, config.absTol);
27291
+ return x >= y || nearlyEqual(x, y, config2.relTol, config2.absTol);
27292
27292
  }
27293
27293
  });
27294
27294
  }
@@ -27310,7 +27310,7 @@ var createSmaller = /* @__PURE__ */ factory(
27310
27310
  dependencies160,
27311
27311
  ({
27312
27312
  typed: typed3,
27313
- config,
27313
+ config: config2,
27314
27314
  bignumber: bignumber2,
27315
27315
  matrix: matrix2,
27316
27316
  DenseMatrix: DenseMatrix6,
@@ -27327,11 +27327,11 @@ var createSmaller = /* @__PURE__ */ factory(
27327
27327
  });
27328
27328
  const compareUnits2 = createCompareUnits({ typed: typed3 });
27329
27329
  function bignumSmaller(x, y) {
27330
- return x.lt(y) && !nearlyEqual2(x, y, config.relTol, config.absTol);
27330
+ return x.lt(y) && !nearlyEqual2(x, y, config2.relTol, config2.absTol);
27331
27331
  }
27332
27332
  return typed3(
27333
27333
  name160,
27334
- createSmallerNumber({ typed: typed3, config }),
27334
+ createSmallerNumber({ typed: typed3, config: config2 }),
27335
27335
  {
27336
27336
  "boolean, boolean": (x, y) => x < y,
27337
27337
  "BigNumber, BigNumber": bignumSmaller,
@@ -27359,10 +27359,10 @@ var createSmaller = /* @__PURE__ */ factory(
27359
27359
  var createSmallerNumber = /* @__PURE__ */ factory(
27360
27360
  name160,
27361
27361
  ["typed", "config"],
27362
- ({ typed: typed3, config }) => {
27362
+ ({ typed: typed3, config: config2 }) => {
27363
27363
  return typed3(name160, {
27364
27364
  "number, number": function(x, y) {
27365
- return x < y && !nearlyEqual(x, y, config.relTol, config.absTol);
27365
+ return x < y && !nearlyEqual(x, y, config2.relTol, config2.absTol);
27366
27366
  }
27367
27367
  });
27368
27368
  }
@@ -27374,7 +27374,7 @@ var dependencies161 = ["typed", "config", "matrix", "DenseMatrix", "concat", "Sp
27374
27374
  var createSmallerEq = /* @__PURE__ */ factory(
27375
27375
  name161,
27376
27376
  dependencies161,
27377
- ({ typed: typed3, config, matrix: matrix2, DenseMatrix: DenseMatrix6, concat: concat3, SparseMatrix }) => {
27377
+ ({ typed: typed3, config: config2, matrix: matrix2, DenseMatrix: DenseMatrix6, concat: concat3, SparseMatrix }) => {
27378
27378
  const matAlgo03xDSf = createMatAlgo03xDSf({ typed: typed3 });
27379
27379
  const matAlgo07xSSf = createMatAlgo07xSSf({ typed: typed3, SparseMatrix });
27380
27380
  const matAlgo12xSfs = createMatAlgo12xSfs({ typed: typed3, DenseMatrix: DenseMatrix6 });
@@ -27386,11 +27386,11 @@ var createSmallerEq = /* @__PURE__ */ factory(
27386
27386
  const compareUnits2 = createCompareUnits({ typed: typed3 });
27387
27387
  return typed3(
27388
27388
  name161,
27389
- createSmallerEqNumber({ typed: typed3, config }),
27389
+ createSmallerEqNumber({ typed: typed3, config: config2 }),
27390
27390
  {
27391
27391
  "boolean, boolean": (x, y) => x <= y,
27392
27392
  "BigNumber, BigNumber": function(x, y) {
27393
- return x.lte(y) || nearlyEqual2(x, y, config.relTol, config.absTol);
27393
+ return x.lte(y) || nearlyEqual2(x, y, config2.relTol, config2.absTol);
27394
27394
  },
27395
27395
  "bigint, bigint": (x, y) => x <= y,
27396
27396
  "Fraction, Fraction": (x, y) => x.compare(y) !== 1,
@@ -27410,10 +27410,10 @@ var createSmallerEq = /* @__PURE__ */ factory(
27410
27410
  var createSmallerEqNumber = /* @__PURE__ */ factory(
27411
27411
  name161,
27412
27412
  ["typed", "config"],
27413
- ({ typed: typed3, config }) => {
27413
+ ({ typed: typed3, config: config2 }) => {
27414
27414
  return typed3(name161, {
27415
27415
  "number, number": function(x, y) {
27416
- return x <= y || nearlyEqual(x, y, config.relTol, config.absTol);
27416
+ return x <= y || nearlyEqual(x, y, config2.relTol, config2.absTol);
27417
27417
  }
27418
27418
  });
27419
27419
  }
@@ -28346,7 +28346,7 @@ var createRange = /* @__PURE__ */ factory(
28346
28346
  dependencies173,
28347
28347
  ({
28348
28348
  typed: typed3,
28349
- config,
28349
+ config: config2,
28350
28350
  matrix: matrix2,
28351
28351
  bignumber: bignumber2,
28352
28352
  smaller: smaller2,
@@ -28440,7 +28440,7 @@ var createRange = /* @__PURE__ */ factory(
28440
28440
  }
28441
28441
  });
28442
28442
  function _out(arr7) {
28443
- if (config.matrix === "Matrix") {
28443
+ if (config2.matrix === "Matrix") {
28444
28444
  return matrix2 ? matrix2(arr7) : noMatrix();
28445
28445
  }
28446
28446
  return arr7;
@@ -28450,7 +28450,7 @@ var createRange = /* @__PURE__ */ factory(
28450
28450
  if (!r) {
28451
28451
  throw new SyntaxError('String "' + str + '" is no valid range');
28452
28452
  }
28453
- if (config.number === "BigNumber") {
28453
+ if (config2.number === "BigNumber") {
28454
28454
  if (bignumber2 === void 0) {
28455
28455
  noBignumber();
28456
28456
  }
@@ -28509,7 +28509,7 @@ var createGamma = /* @__PURE__ */ factory(
28509
28509
  dependencies174,
28510
28510
  ({
28511
28511
  typed: typed3,
28512
- config,
28512
+ config: config2,
28513
28513
  multiplyScalar: _multiplyScalar,
28514
28514
  pow: _pow,
28515
28515
  BigNumber: BigNumber9,
@@ -28555,7 +28555,7 @@ var createGamma = /* @__PURE__ */ factory(
28555
28555
  if (nNum < 8) {
28556
28556
  return new BigNumber9([1, 1, 2, 6, 24, 120, 720, 5040][nNum]);
28557
28557
  }
28558
- const precision = config.precision + (Math.log(nNum) | 0);
28558
+ const precision = config2.precision + (Math.log(nNum) | 0);
28559
28559
  const Big = BigNumber9.clone({ precision });
28560
28560
  if (nNum % 2 === 1) {
28561
28561
  return n.times(bigFactorial(n.minus(1)));
@@ -28763,7 +28763,7 @@ var dependencies177 = ["typed", "config", "numeric", "larger", "isNaN"];
28763
28763
  var createMax = /* @__PURE__ */ factory(
28764
28764
  name177,
28765
28765
  dependencies177,
28766
- ({ typed: typed3, config, numeric: numeric2, larger: larger2, isNaN: mathIsNaN }) => {
28766
+ ({ typed: typed3, config: config2, numeric: numeric2, larger: larger2, isNaN: mathIsNaN }) => {
28767
28767
  return typed3(name177, {
28768
28768
  // max([a, b, c, d, ...])
28769
28769
  "Array | Matrix": _max,
@@ -28820,7 +28820,7 @@ var createMax = /* @__PURE__ */ factory(
28820
28820
  throw new Error("Cannot calculate max of an empty array");
28821
28821
  }
28822
28822
  if (typeof res === "string") {
28823
- res = numeric2(res, safeNumberType(res, config));
28823
+ res = numeric2(res, safeNumberType(res, config2));
28824
28824
  }
28825
28825
  return res;
28826
28826
  }
@@ -28842,7 +28842,7 @@ var dependencies178 = ["typed", "config", "numeric", "smaller", "isNaN"];
28842
28842
  var createMin = /* @__PURE__ */ factory(
28843
28843
  name178,
28844
28844
  dependencies178,
28845
- ({ typed: typed3, config, numeric: numeric2, smaller: smaller2, isNaN: mathIsNaN }) => {
28845
+ ({ typed: typed3, config: config2, numeric: numeric2, smaller: smaller2, isNaN: mathIsNaN }) => {
28846
28846
  return typed3(name178, {
28847
28847
  // min([a, b, c, d, ...])
28848
28848
  "Array | Matrix": _min,
@@ -28899,7 +28899,7 @@ var createMin = /* @__PURE__ */ factory(
28899
28899
  throw new Error("Cannot calculate min of an empty array");
28900
28900
  }
28901
28901
  if (typeof min2 === "string") {
28902
- min2 = numeric2(min2, safeNumberType(min2, config));
28902
+ min2 = numeric2(min2, safeNumberType(min2, config2));
28903
28903
  }
28904
28904
  return min2;
28905
28905
  }
@@ -30180,7 +30180,7 @@ var createSimplifyConstant = /* @__PURE__ */ factory(
30180
30180
  dependencies193,
30181
30181
  ({
30182
30182
  typed: typed3,
30183
- config,
30183
+ config: config2,
30184
30184
  mathWithTransform,
30185
30185
  matrix: matrix2,
30186
30186
  parse: parse3,
@@ -30280,7 +30280,7 @@ var createSimplifyConstant = /* @__PURE__ */ factory(
30280
30280
  }
30281
30281
  const _toNumber = typed3({
30282
30282
  "string, Object": function(s, options) {
30283
- const numericType = safeNumberType(s, config);
30283
+ const numericType = safeNumberType(s, config2);
30284
30284
  if (numericType === "BigNumber") {
30285
30285
  if (bignumber2 === void 0) {
30286
30286
  noBignumber();
@@ -30329,7 +30329,7 @@ var createSimplifyConstant = /* @__PURE__ */ factory(
30329
30329
  return new OperatorNode("-", "unaryMinus", [n]);
30330
30330
  }
30331
30331
  function _fractionToNode(f) {
30332
- const fromBigInt = (value) => config.number === "BigNumber" && bignumber2 ? bignumber2(value) : Number(value);
30332
+ const fromBigInt = (value) => config2.number === "BigNumber" && bignumber2 ? bignumber2(value) : Number(value);
30333
30333
  const signBigInt = BigInt(f.s);
30334
30334
  const numeratorValue = signBigInt * f.n;
30335
30335
  const numeratorNode = numeratorValue < 0n ? new OperatorNode("-", "unaryMinus", [new ConstantNode(fromBigInt(-numeratorValue))]) : new ConstantNode(fromBigInt(numeratorValue));
@@ -33164,7 +33164,7 @@ var createIntersect = /* @__PURE__ */ factory(
33164
33164
  dependencies217,
33165
33165
  ({
33166
33166
  typed: typed3,
33167
- config,
33167
+ config: config2,
33168
33168
  abs: abs2,
33169
33169
  add: add2,
33170
33170
  addScalar: addScalar2,
@@ -33292,7 +33292,7 @@ var createIntersect = /* @__PURE__ */ factory(
33292
33292
  multiplyScalar2(d2[0], d1[1])
33293
33293
  );
33294
33294
  if (isZero2(det2)) return null;
33295
- if (smaller2(abs2(det2), config.relTol)) {
33295
+ if (smaller2(abs2(det2), config2.relTol)) {
33296
33296
  return null;
33297
33297
  }
33298
33298
  const d20o11 = multiplyScalar2(d2[0], o1[1]);
@@ -35276,7 +35276,7 @@ var createZeta = /* @__PURE__ */ factory(
35276
35276
  dependencies235,
35277
35277
  ({
35278
35278
  typed: typed3,
35279
- config,
35279
+ config: config2,
35280
35280
  multiply: multiply2,
35281
35281
  pow: pow2,
35282
35282
  divide: divide2,
@@ -35306,7 +35306,7 @@ var createZeta = /* @__PURE__ */ factory(
35306
35306
  s,
35307
35307
  (value) => new BigNumber9(value),
35308
35308
  () => {
35309
- return Math.abs(Math.log10(config.relTol));
35309
+ return Math.abs(Math.log10(config2.relTol));
35310
35310
  }
35311
35311
  ),
35312
35312
  Complex: zetaComplex
@@ -35327,7 +35327,7 @@ var createZeta = /* @__PURE__ */ factory(
35327
35327
  if (s.re === 0 && s.im === 0) {
35328
35328
  return new Complex12(-0.5);
35329
35329
  }
35330
- if (s.re === 1) {
35330
+ if (s.re === 1 && s.im === 0) {
35331
35331
  return new Complex12(NaN, NaN);
35332
35332
  }
35333
35333
  if (s.re === Infinity && s.im === 0) {
@@ -35907,7 +35907,7 @@ function flattenToFloat649(matrix2, rows, cols) {
35907
35907
  return result;
35908
35908
  }
35909
35909
  function createRealSymmetric({
35910
- config,
35910
+ config: config2,
35911
35911
  addScalar: addScalar2,
35912
35912
  subtract: subtract2,
35913
35913
  abs: abs2,
@@ -35932,7 +35932,7 @@ function createRealSymmetric({
35932
35932
  if (typeof a === "number" && typeof b === "number") return a <= b;
35933
35933
  return a.lte(b);
35934
35934
  }
35935
- function main(arr7, _N, prec = config.relTol, type, computeVectors) {
35935
+ function main(arr7, _N, prec = config2.relTol, type, computeVectors) {
35936
35936
  if (type === "number") {
35937
35937
  return diag2(arr7, prec, computeVectors);
35938
35938
  }
@@ -36053,7 +36053,7 @@ function createRealSymmetric({
36053
36053
  }
36054
36054
  function getTheta(aii, ajj, aij) {
36055
36055
  const denom = ajj - aii;
36056
- if (Math.abs(denom) <= config.relTol) {
36056
+ if (Math.abs(denom) <= config2.relTol) {
36057
36057
  return Math.PI / 4;
36058
36058
  } else {
36059
36059
  return 0.5 * Math.atan(2 * aij / (ajj - aii));
@@ -36061,7 +36061,7 @@ function createRealSymmetric({
36061
36061
  }
36062
36062
  function getThetaBig(aii, ajj, aij) {
36063
36063
  const denom = subtract2(ajj, aii);
36064
- if (bigLte(abs2(denom), bignumber2(config.relTol))) {
36064
+ if (bigLte(abs2(denom), bignumber2(config2.relTol))) {
36065
36065
  return bignumber2(-1).acos().div(4);
36066
36066
  } else {
36067
36067
  return multiplyScalar2(
@@ -36272,7 +36272,7 @@ var createEigs = /* @__PURE__ */ factory(
36272
36272
  name237,
36273
36273
  dependencies237,
36274
36274
  ({
36275
- config,
36275
+ config: config2,
36276
36276
  typed: typed3,
36277
36277
  matrix: matrix2,
36278
36278
  addScalar: addScalar2,
@@ -36307,7 +36307,7 @@ var createEigs = /* @__PURE__ */ factory(
36307
36307
  dot: dot3
36308
36308
  }) => {
36309
36309
  const doRealSymmetric = createRealSymmetric({
36310
- config,
36310
+ config: config2,
36311
36311
  addScalar: addScalar2,
36312
36312
  subtract: subtract2,
36313
36313
  abs: abs2,
@@ -36375,7 +36375,7 @@ var createEigs = /* @__PURE__ */ factory(
36375
36375
  });
36376
36376
  function doEigs(mat, opts = {}) {
36377
36377
  const computeVectors = "eigenvectors" in opts ? opts.eigenvectors : true;
36378
- const prec = opts.precision ?? config.relTol;
36378
+ const prec = opts.precision ?? config2.relTol;
36379
36379
  const result = computeValuesAndVectors(mat, prec, computeVectors);
36380
36380
  if (opts.matricize) {
36381
36381
  result.values = matrix2(result.values);
@@ -37834,7 +37834,7 @@ var createDerivative = /* @__PURE__ */ factory(
37834
37834
  dependencies244,
37835
37835
  ({
37836
37836
  typed: typed3,
37837
- config,
37837
+ config: config2,
37838
37838
  parse: parse3,
37839
37839
  simplify: simplify2,
37840
37840
  equal: equal2,
@@ -38363,7 +38363,7 @@ var createDerivative = /* @__PURE__ */ factory(
38363
38363
  }
38364
38364
  });
38365
38365
  function createConstantNode2(value, valueType) {
38366
- return new ConstantNode(numeric2(value, valueType || safeNumberType(String(value), config)));
38366
+ return new ConstantNode(numeric2(value, valueType || safeNumberType(String(value), config2)));
38367
38367
  }
38368
38368
  return derivative2;
38369
38369
  }
@@ -39128,7 +39128,7 @@ var createRotationMatrix = /* @__PURE__ */ factory(
39128
39128
  dependencies249,
39129
39129
  ({
39130
39130
  typed: typed3,
39131
- config,
39131
+ config: config2,
39132
39132
  multiplyScalar: multiplyScalar2,
39133
39133
  addScalar: addScalar2,
39134
39134
  unaryMinus: unaryMinus2,
@@ -39142,13 +39142,13 @@ var createRotationMatrix = /* @__PURE__ */ factory(
39142
39142
  }) => {
39143
39143
  return typed3(name249, {
39144
39144
  "": function() {
39145
- return config.matrix === "Matrix" ? matrix2([]) : [];
39145
+ return config2.matrix === "Matrix" ? matrix2([]) : [];
39146
39146
  },
39147
39147
  string: function(format6) {
39148
39148
  return matrix2(format6);
39149
39149
  },
39150
39150
  "number | BigNumber | Complex | Unit": function(theta) {
39151
- return _rotationMatrix2x2(theta, config.matrix === "Matrix" ? "dense" : void 0);
39151
+ return _rotationMatrix2x2(theta, config2.matrix === "Matrix" ? "dense" : void 0);
39152
39152
  },
39153
39153
  "number | BigNumber | Complex | Unit, string": function(theta, format6) {
39154
39154
  return _rotationMatrix2x2(theta, format6);
@@ -39160,7 +39160,7 @@ var createRotationMatrix = /* @__PURE__ */ factory(
39160
39160
  },
39161
39161
  "number | BigNumber | Complex | Unit, Matrix": function(theta, v) {
39162
39162
  _validateVector(v);
39163
- const storageType = v.storage() || (config.matrix === "Matrix" ? "dense" : void 0);
39163
+ const storageType = v.storage() || (config2.matrix === "Matrix" ? "dense" : void 0);
39164
39164
  return _rotationMatrix3x3(theta, v, storageType);
39165
39165
  },
39166
39166
  "number | BigNumber | Complex | Unit, Array, string": function(theta, v, format6) {
@@ -39691,8 +39691,8 @@ function unitFactory(name254, valueStr, unitStr) {
39691
39691
  return factory(
39692
39692
  name254,
39693
39693
  dependencies254,
39694
- ({ config, Unit: Unit2, BigNumber: BigNumber9 }) => {
39695
- const value = config.number === "BigNumber" ? new BigNumber9(valueStr) : parseFloat(valueStr);
39694
+ ({ config: config2, Unit: Unit2, BigNumber: BigNumber9 }) => {
39695
+ const value = config2.number === "BigNumber" ? new BigNumber9(valueStr) : parseFloat(valueStr);
39696
39696
  const unit2 = new Unit2(value, unitStr);
39697
39697
  unit2.fixPrefix = true;
39698
39698
  return unit2;
@@ -39704,8 +39704,8 @@ function numberFactory(name254, value) {
39704
39704
  return factory(
39705
39705
  name254,
39706
39706
  dependencies254,
39707
- ({ config, BigNumber: BigNumber9 }) => {
39708
- return config.number === "BigNumber" ? new BigNumber9(value) : value;
39707
+ ({ config: config2, BigNumber: BigNumber9 }) => {
39708
+ return config2.number === "BigNumber" ? new BigNumber9(value) : value;
39709
39709
  }
39710
39710
  );
39711
39711
  }
@@ -42331,6 +42331,13 @@ function casFactor(input) {
42331
42331
  }).then((r) => r.result);
42332
42332
  }
42333
42333
 
42334
+ // src/config-api.ts
42335
+ function config(options) {
42336
+ const shared = factoryScope.config;
42337
+ if (options) Object.assign(shared, options);
42338
+ return { ...shared };
42339
+ }
42340
+
42334
42341
  // src/help.ts
42335
42342
  import { createHelpClass, embeddedDocs } from "@danielsimonjr/mathts-expression";
42336
42343
  var savedConfig = {};
@@ -43796,6 +43803,7 @@ export {
43796
43803
  concat2 as concat,
43797
43804
  cond,
43798
43805
  conductanceQuantum,
43806
+ config,
43799
43807
  conj,
43800
43808
  connectedComponents,
43801
43809
  convexHull,
@@ -1 +1 @@
1
- {"version":3,"file":"zeta.d.ts","sourceRoot":"","sources":["../../src/special/zeta.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,KAAK,EAAE,SAAS,IAAI,aAAa,EAAE,MAAM,aAAa,CAAC;AAG9D,UAAU,WAAW;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,UAAU,kBAAkB;IAC1B,KAAK,EAAE,EAAE,MAAM,EAAE,EA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B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@danielsimonjr/mathts-functions",
3
- "version": "0.13.3",
3
+ "version": "0.14.0",
4
4
  "description": "Mathematical functions for MathTS - arithmetic, algebra, trigonometry, statistics, and more",
5
5
  "author": "Daniel Simon Jr.",
6
6
  "license": "MIT",