nerdamer 2.0.0-rc.1 → 2.0.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.
Files changed (236) hide show
  1. package/BREAKING_CHANGES.md +244 -0
  2. package/README.md +168 -229
  3. package/dist/bundle.js +1 -1
  4. package/dist/bundle.js.LICENSE.txt +6 -6
  5. package/output/algebra/adapters.d.ts +3 -33
  6. package/output/algebra/adapters.js +7 -105
  7. package/output/algebra/algorithms/arith.js +10 -9
  8. package/output/algebra/algorithms/groebnerBase.d.ts +24 -20
  9. package/output/algebra/algorithms/groebnerBase.js +486 -723
  10. package/output/algebra/dispatch.d.ts +1 -0
  11. package/output/algebra/dispatch.js +25 -0
  12. package/output/algebra/factor/factor.d.ts +15 -0
  13. package/output/algebra/factor/factor.js +99 -12
  14. package/output/algebra/gcd/gcd.d.ts +8 -7
  15. package/output/algebra/gcd/gcd.js +32 -78
  16. package/output/algebra/groebner.d.ts +2 -2
  17. package/output/algebra/groebner.js +6 -12
  18. package/output/algebra/partfrac.d.ts +3 -3
  19. package/output/algebra/partfrac.js +28 -61
  20. package/output/algebra/polynomial/ModularSparsePolynomial.d.ts +131 -0
  21. package/output/algebra/polynomial/ModularSparsePolynomial.js +378 -0
  22. package/output/algebra/polynomial/ModularSparsePolynomialFactor.d.ts +40 -0
  23. package/output/algebra/polynomial/ModularSparsePolynomialFactor.js +661 -0
  24. package/output/algebra/polynomial/SparsePolynomialFactor.d.ts +64 -0
  25. package/output/algebra/polynomial/SparsePolynomialFactor.js +492 -0
  26. package/output/algebra/polynomial/SparsePolynomialGcd.d.ts +29 -0
  27. package/output/algebra/polynomial/SparsePolynomialGcd.js +259 -0
  28. package/output/algebra/polynomial/SparsePolynomialMultivariateFactor.d.ts +82 -0
  29. package/output/algebra/polynomial/SparsePolynomialMultivariateFactor.js +604 -0
  30. package/output/algebra/polynomial/modularGcd.d.ts +40 -0
  31. package/output/algebra/polynomial/modularGcd.js +365 -0
  32. package/output/algebra/polynomialize.js +4 -2
  33. package/output/algebra/simplify/funcsimp.js +1 -1
  34. package/output/algebra/simplify/ratsimp.js +1 -1
  35. package/output/algebra/simplify/simplify.js +11 -2
  36. package/output/algebra/utils.d.ts +1 -1
  37. package/output/algebra/utils.js +3 -3
  38. package/output/api/advanced.d.ts +2 -1
  39. package/output/api/advanced.js +3 -3
  40. package/output/api/algebra.d.ts +21 -4
  41. package/output/api/algebra.js +22 -3
  42. package/output/api/assumptions.d.ts +1 -1
  43. package/output/api/assumptions.js +2 -1
  44. package/output/api/calculus.d.ts +2 -1
  45. package/output/api/calculus.js +2 -1
  46. package/output/api/core.d.ts +28 -7
  47. package/output/api/core.js +28 -2
  48. package/output/api/languages/deu.d.ts +3 -0
  49. package/output/api/languages/deu.js +266 -0
  50. package/output/api/languages/fra.d.ts +3 -0
  51. package/output/api/languages/fra.js +266 -0
  52. package/output/api/languages/ita.d.ts +3 -0
  53. package/output/api/languages/ita.js +266 -0
  54. package/output/api/languages/nld.d.ts +3 -0
  55. package/output/api/languages/nld.js +266 -0
  56. package/output/api/languages/por.d.ts +3 -0
  57. package/output/api/languages/por.js +266 -0
  58. package/output/api/languages/spa.d.ts +3 -0
  59. package/output/api/languages/spa.js +266 -0
  60. package/output/api/parser.d.ts +10 -2
  61. package/output/api/parser.js +2 -0
  62. package/output/api/solve.d.ts +1 -1
  63. package/output/api/solve.js +2 -1
  64. package/output/api/structures.d.ts +1 -1
  65. package/output/api/structures.js +2 -1
  66. package/output/calculus/adapters.d.ts +8 -0
  67. package/output/calculus/adapters.js +41 -0
  68. package/output/calculus/derivative/diff.js +6 -3
  69. package/output/calculus/dispatch.d.ts +1 -0
  70. package/output/calculus/dispatch.js +25 -0
  71. package/output/calculus/integrate/integrate.js +4 -4
  72. package/output/calculus/integrate/integrationTable.js +16 -16
  73. package/output/calculus/laplace/ilaplace.js +1 -1
  74. package/output/calculus/laplace/ilaplaceTable.js +18 -17
  75. package/output/calculus/laplace/laplaceTable.js +3 -2
  76. package/output/calculus/limit/limit.js +1 -1
  77. package/output/core/classes/assumption/Assumption.js +14 -10
  78. package/output/core/classes/assumption/assume.d.ts +6 -0
  79. package/output/core/classes/assumption/assume.js +9 -0
  80. package/output/core/classes/assumption/dispatch.d.ts +1 -0
  81. package/output/core/classes/assumption/dispatch.js +11 -0
  82. package/output/core/classes/collection/Collection.js +11 -2
  83. package/output/core/classes/complex/Complex.d.ts +10 -0
  84. package/output/core/classes/complex/Complex.js +19 -1
  85. package/output/core/classes/decimalSet/DecimalSet.js +5 -4
  86. package/output/core/classes/dictionary/Dictionary.js +4 -1
  87. package/output/core/classes/expression/CoeffObject.d.ts +1 -1
  88. package/output/core/classes/expression/CoeffObject.js +1 -2
  89. package/output/core/classes/expression/Expression.d.ts +35 -26
  90. package/output/core/classes/expression/Expression.js +77 -50
  91. package/output/core/classes/expression/analysis.d.ts +1 -1
  92. package/output/core/classes/expression/analysis.js +7 -7
  93. package/output/core/classes/expression/format.d.ts +9 -0
  94. package/output/core/classes/expression/format.js +130 -7
  95. package/output/core/classes/expression/utils.d.ts +9 -0
  96. package/output/core/classes/expression/utils.js +52 -6
  97. package/output/core/classes/matrix/Matrix.d.ts +2 -3
  98. package/output/core/classes/matrix/Matrix.js +26 -23
  99. package/output/core/classes/matrix/dispatch.d.ts +1 -0
  100. package/output/core/classes/matrix/dispatch.js +19 -0
  101. package/output/core/classes/matrix/functions.d.ts +2 -0
  102. package/output/core/classes/matrix/functions.js +5 -0
  103. package/output/core/classes/parser/Parser.d.ts +31 -5
  104. package/output/core/classes/parser/Parser.js +357 -444
  105. package/output/core/classes/parser/constants.d.ts +2 -0
  106. package/output/core/classes/parser/constants.js +4 -2
  107. package/output/core/classes/parser/controlFlowSignals.d.ts +38 -0
  108. package/output/core/classes/parser/controlFlowSignals.js +60 -0
  109. package/output/core/classes/parser/operations/add.js +14 -16
  110. package/output/core/classes/parser/operations/compare.js +13 -0
  111. package/output/core/classes/parser/operations/functions.d.ts +3 -4
  112. package/output/core/classes/parser/operations/functions.js +48 -102
  113. package/output/core/classes/parser/operations/multiply.js +22 -15
  114. package/output/core/classes/parser/operations/power.js +11 -11
  115. package/output/core/classes/parser/operations/subtract.js +2 -1
  116. package/output/core/classes/parser/preprocess.d.ts +0 -7
  117. package/output/core/classes/parser/preprocess.js +33 -39
  118. package/output/core/classes/parser/scripting/controlFlow.d.ts +4 -102
  119. package/output/core/classes/parser/scripting/controlFlow.js +134 -186
  120. package/output/core/classes/parser/scripting/deferred.d.ts +4 -0
  121. package/output/core/classes/parser/scripting/deferred.js +65 -0
  122. package/output/core/classes/parser/scripting/dispatch.d.ts +1 -0
  123. package/output/core/classes/parser/scripting/dispatch.js +62 -0
  124. package/output/core/classes/parser/scripting/evaluate.d.ts +13 -0
  125. package/output/core/classes/parser/scripting/evaluate.js +17 -1
  126. package/output/core/classes/parser/scripting/scope.d.ts +1 -28
  127. package/output/core/classes/parser/scripting/scope.js +36 -40
  128. package/output/core/classes/parser/types.d.ts +5 -5
  129. package/output/core/classes/parser/wrappers/IndexedReference.d.ts +4 -3
  130. package/output/core/classes/parser/wrappers/IndexedReference.js +8 -0
  131. package/output/core/classes/parser/wrappers/KeyValuePair.d.ts +2 -2
  132. package/output/core/classes/polynomial/Polynomial.d.ts +5 -1
  133. package/output/core/classes/polynomial/Polynomial.js +53 -7
  134. package/output/core/classes/polynomial/SparsePolynomial.d.ts +221 -0
  135. package/output/core/classes/polynomial/SparsePolynomial.js +824 -0
  136. package/output/core/classes/polynomial/SparsePolynomialAdapter.d.ts +56 -0
  137. package/output/core/classes/polynomial/SparsePolynomialAdapter.js +241 -0
  138. package/output/core/classes/polynomial/Term.js +2 -2
  139. package/output/core/{adapters.d.ts → classes/polynomial/adapters.d.ts} +2 -2
  140. package/output/core/classes/polynomial/adapters.js +33 -0
  141. package/output/core/classes/polynomial/dispatch.d.ts +1 -0
  142. package/output/core/classes/polynomial/dispatch.js +14 -0
  143. package/output/core/classes/polynomial/functions.d.ts +8 -0
  144. package/output/core/classes/polynomial/functions.js +71 -8
  145. package/output/core/classes/polynomial/utils.js +2 -1
  146. package/output/core/classes/rational/Rational.d.ts +8 -11
  147. package/output/core/classes/rational/Rational.js +70 -20
  148. package/output/core/classes/seq/SEQ.js +4 -4
  149. package/output/core/classes/valuesSet/ValuesSet.d.ts +9 -1
  150. package/output/core/classes/valuesSet/ValuesSet.js +22 -4
  151. package/output/core/classes/vector/Vector.d.ts +2 -3
  152. package/output/core/classes/vector/Vector.js +11 -15
  153. package/output/core/classes/vector/dispatch.d.ts +1 -0
  154. package/output/core/classes/vector/dispatch.js +11 -0
  155. package/output/core/common/classes/MathematicalAggregate.js +11 -2
  156. package/output/core/common/classes/StructuredEntity.d.ts +0 -17
  157. package/output/core/common/classes/StructuredEntity.js +3 -64
  158. package/output/core/common/common.d.ts +0 -1
  159. package/output/core/common/common.js +29 -234
  160. package/output/core/converters/BaseConverter.js +3 -2
  161. package/output/core/converters/Converter.js +9 -5
  162. package/output/core/converters/Pattern.js +1 -1
  163. package/output/core/dispatch.d.ts +18 -0
  164. package/output/core/dispatch.js +3 -281
  165. package/output/core/errors.d.ts +259 -474
  166. package/output/core/errors.js +270 -542
  167. package/output/core/fullFunctions.d.ts +7 -0
  168. package/output/core/fullFunctions.js +31 -0
  169. package/output/core/functions/bigint/bigint.d.ts +13 -1
  170. package/output/core/functions/bigint/bigint.js +56 -4
  171. package/output/core/functions/bigint/primeFactor.d.ts +2 -0
  172. package/output/core/functions/bigint/primeFactor.js +13 -13
  173. package/output/core/functions/build/definitions.js +6 -0
  174. package/output/core/functions/complex.d.ts +2 -2
  175. package/output/core/functions/complex.dispatch.d.ts +1 -0
  176. package/output/core/functions/complex.dispatch.js +16 -0
  177. package/output/core/functions/complex.js +7 -7
  178. package/output/core/functions/decimal.js +2 -1
  179. package/output/core/functions/expand/expand.js +2 -2
  180. package/output/core/functions/numeric.d.ts +1 -1
  181. package/output/core/functions/string.js +2 -1
  182. package/output/core/functions/subst.js +21 -13
  183. package/output/core/parserFunctions.d.ts +7 -0
  184. package/output/core/parserFunctions.js +25 -0
  185. package/output/index.d.ts +50 -30
  186. package/output/index.js +147 -19
  187. package/output/math/defint/defint.d.ts +18 -0
  188. package/output/math/defint/defint.js +60 -0
  189. package/output/math/defint/defintDecimal.js +6 -5
  190. package/output/math/defint/defintNative.js +7 -18
  191. package/output/math/dispatch.d.ts +1 -0
  192. package/output/math/dispatch.js +101 -0
  193. package/output/math/geometry.d.ts +4 -0
  194. package/output/math/geometry.js +23 -0
  195. package/output/math/math.d.ts +59 -19
  196. package/output/math/math.js +244 -100
  197. package/output/math/trig.js +4 -4
  198. package/output/math/utils.d.ts +6 -0
  199. package/output/math/utils.js +39 -0
  200. package/output/solve/classes/PolynomialSolver.d.ts +33 -14
  201. package/output/solve/classes/PolynomialSolver.js +267 -67
  202. package/output/solve/classes/SolutionSet.d.ts +20 -1
  203. package/output/solve/classes/SolutionSet.js +82 -5
  204. package/output/solve/dispatch.d.ts +1 -0
  205. package/output/solve/dispatch.js +13 -0
  206. package/output/solve/linsolve.d.ts +2 -0
  207. package/output/solve/linsolve.js +13 -5
  208. package/output/solve/solve.d.ts +10 -0
  209. package/output/solve/solve.js +128 -20
  210. package/output/solve/solveSystem.d.ts +1 -1
  211. package/output/solve/solveSystem.js +8 -32
  212. package/output/solve/utils.d.ts +2 -1
  213. package/output/solve/utils.js +18 -22
  214. package/output/utils/array.d.ts +1 -1
  215. package/output/utils/debug.js +2 -1
  216. package/package.json +22 -38
  217. package/dist/parser.js +0 -2
  218. package/dist/parser.js.LICENSE.txt +0 -7
  219. package/docs-data/parser-functions.json +0 -1960
  220. package/output/algebra/algorithms/factor.d.ts +0 -3
  221. package/output/algebra/algorithms/factor.js +0 -5
  222. package/output/algebra/algorithms/factorMultivariate.d.ts +0 -23
  223. package/output/algebra/algorithms/factorMultivariate.js +0 -2393
  224. package/output/algebra/algorithms/factorUnivariate.d.ts +0 -72
  225. package/output/algebra/algorithms/factorUnivariate.js +0 -1072
  226. package/output/algebra/algorithms/gcd.d.ts +0 -22
  227. package/output/algebra/algorithms/gcd.js +0 -690
  228. package/output/algebra/algorithms/multiPoly/MultiPoly.d.ts +0 -137
  229. package/output/algebra/algorithms/multiPoly/MultiPoly.js +0 -346
  230. package/output/algebra/algorithms/poly.d.ts +0 -228
  231. package/output/algebra/algorithms/poly.js +0 -1299
  232. package/output/algebra/algorithms/rational.d.ts +0 -17
  233. package/output/algebra/algorithms/rational.js +0 -115
  234. package/output/core/adapters.js +0 -40
  235. package/output/core/classes/parser/operations/comma.d.ts +0 -7
  236. package/output/core/classes/parser/operations/comma.js +0 -11
package/output/index.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- import { sqcomp } from './algebra/utils';
2
1
  import { Assumption } from './core/classes/assumption/Assumption';
3
2
  import { Collection } from './core/classes/collection/Collection';
4
3
  import { Dictionary } from './core/classes/dictionary/Dictionary';
@@ -12,10 +11,10 @@ import { Rational } from './core/classes/rational/Rational';
12
11
  import { ValuesSet } from './core/classes/valuesSet/ValuesSet';
13
12
  import { Vector } from './core/classes/vector/Vector';
14
13
  import { Converter } from './core/converters/Converter';
15
- import { build } from './core/functions/build';
14
+ import * as errors from './core/errors';
16
15
  import { imagPart, polarForm, realPart, rectForm } from './core/functions/complex';
17
- import { ceiling, dirac, doubleFactorial, fibonacci } from './math/math';
18
- import { isprime } from './math/utils';
16
+ import { gammaIncomplete, gammaIncompleteLower } from './math/math';
17
+ import { continuedFraction, isprime } from './math/utils';
19
18
  import { SolutionSet } from './solve/classes/SolutionSet';
20
19
  import type { OptionsObject, ParserConstants, ParserValuesObject, TextOptions } from './core/classes/parser/types';
21
20
  import type { ExpressionInput, ParserEntity } from './core/types';
@@ -166,8 +165,9 @@ declare namespace nerdamer {
166
165
  var setConstant: (name: string, value: number | string) => typeof nerdamer;
167
166
  var getConstant: (name: string) => string;
168
167
  var set: (setting: string | OptionsObject, value?: boolean | string | number | bigint) => typeof nerdamer;
169
- var get: (setting: Parameters<typeof Parser.get>[0] | "PRECISION") => number | bigint | boolean | "eng" | "spa" | "fra" | "deu" | "por" | "ita" | "nld";
168
+ var get: (setting: Parameters<typeof Parser.get>[0] | "PRECISION") => number | bigint | boolean | errors.Language;
170
169
  var getOperator: (symbol: string) => import("./api/parser").Operator | undefined;
170
+ var isReserved: (name: string) => boolean;
171
171
  var setOperator: (operator: Parameters<typeof Parser.setOperator>[0], action?: Parameters<typeof Parser.setOperator>[1]) => typeof nerdamer;
172
172
  var aliasOperator: (symbol: string, alias: string) => typeof nerdamer;
173
173
  var setVar: (name: string, value: number | string | "delete") => void;
@@ -177,10 +177,10 @@ declare namespace nerdamer {
177
177
  user: string[];
178
178
  system: string[];
179
179
  };
180
- var symbols: typeof import("./core/classes/expression/shortcuts").symbols;
180
+ var symbols: typeof import("./api/core").symbols;
181
181
  var version: () => string;
182
182
  var errors: typeof import("./core/errors");
183
- var buildFunction: typeof build;
183
+ var buildFunction: (x: ExpressionInput, argsArray?: string[]) => (...args: number[]) => number;
184
184
  var classes: {
185
185
  Expression: typeof Expression;
186
186
  Rational: typeof Rational;
@@ -202,15 +202,17 @@ declare namespace nerdamer {
202
202
  VALUE_SETS: string[];
203
203
  WHITE_SPACE: string[];
204
204
  KNOWN_VALUES: Record<string, ParserEntity>;
205
+ extractDictionaryKey(scope: import("./core/common/classes/Scope").Scope, values?: ParserValuesObject, assertive?: boolean): string;
205
206
  extractIndices(scope: import("./core/common/classes/Scope").Scope, values?: ParserValuesObject, assertive?: boolean): number[] | Expression[];
206
- extractStringKeys(scope: import("./core/common/classes/Scope").Scope): string[];
207
+ resolveSymbolicAccess(symbolicTarget: Expression, resolvedTarget: ParserEntity, indices: Expression[]): ParserEntity;
207
208
  aliasOperator(symbol: string, alias: string): /*elided*/ any;
208
209
  create(): /*elided*/ any;
209
210
  evaluate(str: string, values?: ParserValuesObject): ParserEntity;
210
- get(setting: keyof typeof import("./core/Settings").Settings): number | bigint | boolean | "eng" | "spa" | "fra" | "deu" | "por" | "ita" | "nld";
211
+ get(setting: keyof typeof import("./core/Settings").Settings): number | bigint | boolean | errors.Language;
211
212
  getI(): string;
212
213
  getOperator(symbol: string): import("./api/parser").Operator | undefined;
213
214
  getPrecision(): number;
215
+ isReserved(name: string): boolean;
214
216
  parse(str: ExpressionInput, values?: ParserValuesObject): ParserEntity;
215
217
  parseRPN(rpn: import("./core/common/classes/Scope").Scope, values?: ParserValuesObject, assertive?: boolean): ParserEntity;
216
218
  parseTeXRPN(rpn: import("./core/common/classes/Scope").Scope): string;
@@ -232,9 +234,9 @@ declare namespace nerdamer {
232
234
  var acos: typeof import("./math/trig").acos;
233
235
  var asin: typeof import("./math/trig").asin;
234
236
  var atan: typeof import("./math/trig").atan;
235
- var arccos: typeof import("./math/trig").acos;
236
- var arcsin: typeof import("./math/trig").asin;
237
- var arctan: typeof import("./math/trig").atan;
237
+ var arccos: (x: ExpressionInput) => Expression;
238
+ var arcsin: (x: ExpressionInput) => Expression;
239
+ var arctan: (x: ExpressionInput) => Expression;
238
240
  var atan2: typeof import("./math/trig").atan2;
239
241
  var sec: typeof import("./math/trig").sec;
240
242
  var csc: typeof import("./math/trig").csc;
@@ -255,6 +257,9 @@ declare namespace nerdamer {
255
257
  var acsch: typeof import("./math/trig").acsch;
256
258
  var acoth: typeof import("./math/trig").acoth;
257
259
  var log: typeof import("./math/math").log;
260
+ var log10: typeof import("./math/math").log10;
261
+ var radians: typeof import("./math/math").radians;
262
+ var degrees: typeof import("./math/math").degrees;
258
263
  var exp: typeof import("./math/math").exp;
259
264
  var sqrt: typeof import("./math/math").sqrt;
260
265
  var cbrt: typeof import("./math/math").cbrt;
@@ -266,14 +271,14 @@ declare namespace nerdamer {
266
271
  var max: typeof import("./math/math").max;
267
272
  var round: typeof import("./math/math").round;
268
273
  var floor: typeof import("./math/math").floor;
269
- var ceil: typeof ceiling;
274
+ var ceil: (x: ExpressionInput) => Expression;
270
275
  var trunc: typeof import("./math/trunc").trunc;
271
276
  var hypot: typeof import("./math/geometry").hypot;
272
- var fact: typeof import("./math/math").factorial;
277
+ var fact: (x: Expression) => Expression;
273
278
  var factorial: typeof import("./math/math").factorial;
274
- var dfact: typeof doubleFactorial;
275
- var dfactorial: typeof doubleFactorial;
276
- var fib: typeof fibonacci;
279
+ var dfact: (x: Expression) => Expression;
280
+ var dfactorial: (x: Expression) => Expression;
281
+ var fib: (x: ExpressionInput) => Expression;
277
282
  var mod: typeof import("./math/math").mod;
278
283
  var modInv: typeof import("./math/math").modInv;
279
284
  var isPrime: typeof isprime;
@@ -285,10 +290,15 @@ declare namespace nerdamer {
285
290
  var conjugate: typeof import("./core/functions/complex").conjugate;
286
291
  var csgn: typeof import("./core/functions/complex").csgn;
287
292
  var gamma: typeof import("./math/math").gamma;
293
+ var gamma_incomplete: typeof gammaIncomplete;
294
+ var gamma_incomplete_lower: typeof gammaIncompleteLower;
288
295
  var erf: typeof import("./math/math").erf;
289
296
  var erfc: typeof import("./math/math").erfc;
290
297
  var heaviside: typeof import("./math/math").heaviside;
291
- var delta: typeof dirac;
298
+ var step: typeof import("./math/math").step;
299
+ var rect: typeof import("./math/math").rect;
300
+ var tri: typeof import("./math/math").tri;
301
+ var delta: (x: Expression) => Expression;
292
302
  var Ci: typeof import("./math/math").Ci;
293
303
  var Chi: typeof import("./math/math").Chi;
294
304
  var Si: typeof import("./math/math").Si;
@@ -296,44 +306,54 @@ declare namespace nerdamer {
296
306
  var Li: typeof import("./math/math").Li;
297
307
  var Ei: typeof import("./math/math").Ei;
298
308
  var sinc: typeof import("./math/math").sinc;
309
+ var parens: typeof import("./math/math").parens;
310
+ var continued_fraction: typeof continuedFraction;
311
+ var scientific: typeof import("./math/math").scientific;
299
312
  var contains: typeof import("./math/math").contains;
300
313
  var subst: typeof import("./core/functions/subst").subst;
301
- var uSub: typeof import("./core/functions/subst").uSub;
302
- var uUnSub: typeof import("./core/functions/subst").uUnSub;
314
+ var uSub: typeof import("./api/algebra").uSub;
315
+ var uUnSub: typeof import("./api/algebra").uUnSub;
303
316
  var expand: typeof import("./core/functions/expand/expand").expand;
304
- var factor: typeof import("./algebra/factor/factor").factor;
305
- var polyFactors: typeof import("./algebra/factor/factor").polyFactors;
306
- var completeSquare: typeof sqcomp;
307
- var gcd: typeof import("./algebra/gcd/gcd").gcd;
308
- var lcm: typeof import("./algebra/gcd/gcd").lcm;
317
+ var factor: typeof import("./api/algebra").factor;
318
+ var pfactor: typeof import("./api/algebra").pfactor;
319
+ var pfactord: typeof import("./api/algebra").pfactord;
320
+ var polyFactors: typeof import("./api/algebra").polyFactors;
321
+ var completeSquare: (expr: ExpressionInput, variable?: string) => import("./algebra/utils").CompleteSquareResult;
322
+ var gcd: typeof import("./api/algebra").gcd;
323
+ var lcm: typeof import("./api/algebra").lcm;
309
324
  var partfrac: typeof import("./algebra/partfrac").partfrac;
310
325
  var div: typeof polynomialDiv;
311
326
  var divide: typeof polynomialDivide;
312
- var simplify: typeof import("./algebra/simplify/simplify").simplify;
327
+ var simplify: typeof import("./api/algebra").simplify;
313
328
  var groebner: typeof import("./algebra/groebner").groebner;
314
329
  var solve: typeof import("./solve/solve").solve;
330
+ var roots: typeof import("./solve/solve").roots;
315
331
  var solveSystem: typeof import("./solve/solveSystem").solveSystem;
316
332
  var solveeqs: typeof import("./solve/solveSystem").solveSystem;
317
333
  var diff: typeof import("./calculus/derivative/diff").diff;
318
334
  var integrate: typeof import("./calculus/integrate/integrate").integrate;
319
335
  var laplace: typeof import("./calculus/laplace/laplace").laplace;
320
336
  var ilaplace: typeof import("./calculus/laplace/ilaplace").ilaplace;
321
- var ilt: typeof import("./calculus/laplace/ilaplace").ilaplace;
337
+ var ilt: (expr: ExpressionInput, s: ExpressionInput, t: ExpressionInput) => Expression;
322
338
  var sum: typeof import("./math/math").sum;
323
339
  var product: typeof import("./math/math").product;
324
340
  var limit: typeof import("./calculus/limit/limit").limit;
325
- var defint: typeof import("./math/math").defint;
341
+ var defint: typeof import("./math/defint/defint").defint;
326
342
  var S: typeof import("./calculus/fresnel").S;
327
343
  var C: typeof import("./calculus/fresnel").C;
328
344
  var matrix: typeof import("./math/math").matrix;
329
345
  var imatrix: typeof import("./core/classes/matrix/utils").imatrix;
330
346
  var determinant: typeof import("./core/classes/matrix/functions").determinant;
347
+ var invert: typeof import("./core/classes/matrix/functions").invert;
331
348
  var nullspace: typeof import("./core/classes/matrix/functions").nullspace;
332
349
  var dot: typeof import("./core/classes/vector/functions").dot;
333
350
  var cross: typeof import("./core/classes/vector/functions").cross;
334
- var deg: typeof import("./core/classes/polynomial/functions").deg;
335
- var content: typeof import("./core/classes/polynomial/functions").content;
351
+ var line: typeof import("./math/geometry").line;
352
+ var deg: typeof import("./api/algebra").deg;
353
+ var content: typeof import("./api/algebra").content;
354
+ var coeffs: typeof import("./api/algebra").coeffs;
336
355
  var assume: typeof import("./core/classes/assumption/assume").assume;
356
+ var getAssumptions: typeof import("./core/classes/assumption/assume").getAssumptions;
337
357
  var updateAPI: () => typeof nerdamer;
338
358
  }
339
359
  export default nerdamer;
package/output/index.js CHANGED
@@ -42,7 +42,8 @@ const gcd_1 = require("./algebra/gcd/gcd");
42
42
  const groebner_1 = require("./algebra/groebner");
43
43
  const partfrac_1 = require("./algebra/partfrac");
44
44
  const simplify_1 = require("./algebra/simplify/simplify");
45
- const utils_1 = require("./algebra/utils");
45
+ const algebra_1 = require("./api/algebra");
46
+ const core_1 = require("./api/core");
46
47
  const diff_1 = require("./calculus/derivative/diff");
47
48
  const fresnel_1 = require("./calculus/fresnel");
48
49
  const integrate_1 = require("./calculus/integrate/integrate");
@@ -58,7 +59,7 @@ const Expression_1 = require("./core/classes/expression/Expression");
58
59
  const shortcuts_1 = require("./core/classes/expression/shortcuts");
59
60
  const functions_1 = require("./core/classes/matrix/functions");
60
61
  const Matrix_1 = require("./core/classes/matrix/Matrix");
61
- const utils_2 = require("./core/classes/matrix/utils");
62
+ const utils_1 = require("./core/classes/matrix/utils");
62
63
  const constants_1 = require("./core/classes/parser/constants");
63
64
  const Parser_1 = require("./core/classes/parser/Parser");
64
65
  const scope_1 = require("./core/classes/parser/scripting/scope");
@@ -71,19 +72,21 @@ const Vector_1 = require("./core/classes/vector/Vector");
71
72
  const Converter_1 = require("./core/converters/Converter");
72
73
  const dispatch_1 = require("./core/dispatch");
73
74
  const errors = __importStar(require("./core/errors"));
74
- const build_1 = require("./core/functions/build");
75
+ const fullFunctions_1 = require("./core/fullFunctions");
75
76
  const complex_1 = require("./core/functions/complex");
76
77
  const expand_1 = require("./core/functions/expand/expand");
77
78
  const setFunction_1 = require("./core/functions/setFunction");
78
79
  const subst_1 = require("./core/functions/subst");
80
+ const defint_1 = require("./math/defint/defint");
79
81
  const geometry_1 = require("./math/geometry");
80
82
  const math_1 = require("./math/math");
81
83
  const trig_1 = require("./math/trig");
82
84
  const trunc_1 = require("./math/trunc");
83
- const utils_3 = require("./math/utils");
85
+ const utils_2 = require("./math/utils");
84
86
  const SolutionSet_1 = require("./solve/classes/SolutionSet");
85
87
  const solve_1 = require("./solve/solve");
86
88
  const solveSystem_1 = require("./solve/solveSystem");
89
+ (0, fullFunctions_1.registerNerdamerFunctions)();
87
90
  /**
88
91
  * Adds selected root functions as instance methods without changing the source classes.
89
92
  * Existing class methods win, so a class can keep a more specific implementation.
@@ -412,6 +415,10 @@ nerdamer.get = function (setting) {
412
415
  nerdamer.getOperator = function (symbol) {
413
416
  return Parser_1.Parser.getOperator(symbol);
414
417
  };
418
+ /** Returns whether Nerdamer currently reserves a variable or symbol name. */
419
+ nerdamer.isReserved = function (name) {
420
+ return Parser_1.Parser.isReserved(name);
421
+ };
415
422
  /** Registers or updates a parser operator and returns the root API for chaining. */
416
423
  nerdamer.setOperator = function (operator, action) {
417
424
  Parser_1.Parser.setOperator(operator, action);
@@ -529,7 +536,7 @@ nerdamer.errors = errors;
529
536
  * nerdamer('cos(x)').buildFunction(['x'])(0); // 1
530
537
  * ```
531
538
  */
532
- nerdamer.buildFunction = build_1.build;
539
+ nerdamer.buildFunction = core_1.buildFunction;
533
540
  /**
534
541
  * Compatibility registry of selected Nerdamer constructors and the shared Parser instance.
535
542
  *
@@ -565,9 +572,36 @@ nerdamer.tan = trig_1.tan;
565
572
  nerdamer.acos = trig_1.acos;
566
573
  nerdamer.asin = trig_1.asin;
567
574
  nerdamer.atan = trig_1.atan;
568
- nerdamer.arccos = trig_1.acos;
569
- nerdamer.arcsin = trig_1.asin;
570
- nerdamer.arctan = trig_1.atan;
575
+ const arccos = trig_1.acos;
576
+ /**
577
+ * Alias for `nerdamer.acos`.
578
+ *
579
+ * @example
580
+ * ```ts
581
+ * nerdamer.arccos('1/2').text(); // "1/3*pi"
582
+ * ```
583
+ */
584
+ nerdamer.arccos = arccos;
585
+ const arcsin = trig_1.asin;
586
+ /**
587
+ * Alias for `nerdamer.asin`.
588
+ *
589
+ * @example
590
+ * ```ts
591
+ * nerdamer.arcsin('1/2').text(); // "1/6*pi"
592
+ * ```
593
+ */
594
+ nerdamer.arcsin = arcsin;
595
+ const arctan = trig_1.atan;
596
+ /**
597
+ * Alias for `nerdamer.atan`.
598
+ *
599
+ * @example
600
+ * ```ts
601
+ * nerdamer.arctan(1).text(); // "1/4*pi"
602
+ * ```
603
+ */
604
+ nerdamer.arctan = arctan;
571
605
  nerdamer.atan2 = trig_1.atan2;
572
606
  nerdamer.sec = trig_1.sec;
573
607
  nerdamer.csc = trig_1.csc;
@@ -590,6 +624,9 @@ nerdamer.acsch = trig_1.acsch;
590
624
  nerdamer.acoth = trig_1.acoth;
591
625
  // Elementary and numeric functions
592
626
  nerdamer.log = math_1.log;
627
+ nerdamer.log10 = math_1.log10;
628
+ nerdamer.radians = math_1.radians;
629
+ nerdamer.degrees = math_1.degrees;
593
630
  nerdamer.exp = math_1.exp;
594
631
  nerdamer.sqrt = math_1.sqrt;
595
632
  nerdamer.cbrt = math_1.cbrt;
@@ -601,18 +638,63 @@ nerdamer.min = math_1.min;
601
638
  nerdamer.max = math_1.max;
602
639
  nerdamer.round = math_1.round;
603
640
  nerdamer.floor = math_1.floor;
604
- nerdamer.ceil = math_1.ceiling;
641
+ const ceil = math_1.ceiling;
642
+ /**
643
+ * Rounds a value up to the nearest integer.
644
+ *
645
+ * @example
646
+ * ```ts
647
+ * nerdamer.ceil('3.2').text(); // "4"
648
+ * ```
649
+ */
650
+ nerdamer.ceil = ceil;
605
651
  nerdamer.trunc = trunc_1.trunc;
606
652
  nerdamer.hypot = geometry_1.hypot;
607
653
  // Discrete and number-theoretic functions
608
- nerdamer.fact = math_1.factorial;
654
+ const fact = math_1.factorial;
655
+ /**
656
+ * Alias for `nerdamer.factorial`.
657
+ *
658
+ * @example
659
+ * ```ts
660
+ * nerdamer.fact(5).text(); // "120"
661
+ * ```
662
+ */
663
+ nerdamer.fact = fact;
609
664
  nerdamer.factorial = math_1.factorial;
610
- nerdamer.dfact = math_1.doubleFactorial;
611
- nerdamer.dfactorial = math_1.doubleFactorial;
612
- nerdamer.fib = math_1.fibonacci;
665
+ const dfact = math_1.doubleFactorial;
666
+ /**
667
+ * Computes the double factorial of an expression.
668
+ *
669
+ * @example
670
+ * ```ts
671
+ * nerdamer.dfact(6).text(); // "48"
672
+ * ```
673
+ */
674
+ nerdamer.dfact = dfact;
675
+ const dfactorial = math_1.doubleFactorial;
676
+ /**
677
+ * Computes the double factorial of an expression.
678
+ *
679
+ * @example
680
+ * ```ts
681
+ * nerdamer.dfactorial(7).text(); // "105"
682
+ * ```
683
+ */
684
+ nerdamer.dfactorial = dfactorial;
685
+ const fib = math_1.fibonacci;
686
+ /**
687
+ * Computes the Fibonacci number for an integer index.
688
+ *
689
+ * @example
690
+ * ```ts
691
+ * nerdamer.fib(10).text(); // "55"
692
+ * ```
693
+ */
694
+ nerdamer.fib = fib;
613
695
  nerdamer.mod = math_1.mod;
614
696
  nerdamer.modInv = math_1.modInv;
615
- nerdamer.isPrime = utils_3.isprime;
697
+ nerdamer.isPrime = utils_2.isprime;
616
698
  // Complex functions
617
699
  nerdamer.imagpart = complex_1.imagPart;
618
700
  nerdamer.realpart = complex_1.realPart;
@@ -623,10 +705,24 @@ nerdamer.conjugate = complex_1.conjugate;
623
705
  nerdamer.csgn = complex_1.csgn;
624
706
  // Special functions
625
707
  nerdamer.gamma = math_1.gamma;
708
+ nerdamer.gamma_incomplete = math_1.gammaIncomplete;
709
+ nerdamer.gamma_incomplete_lower = math_1.gammaIncompleteLower;
626
710
  nerdamer.erf = math_1.erf;
627
711
  nerdamer.erfc = math_1.erfc;
628
712
  nerdamer.heaviside = math_1.heaviside;
629
- nerdamer.delta = math_1.dirac;
713
+ nerdamer.step = math_1.step;
714
+ nerdamer.rect = math_1.rect;
715
+ nerdamer.tri = math_1.tri;
716
+ const delta = math_1.dirac;
717
+ /**
718
+ * Evaluates the Dirac delta function when the input is known to be nonzero.
719
+ *
720
+ * @example
721
+ * ```ts
722
+ * nerdamer.delta(5).text(); // "0"
723
+ * ```
724
+ */
725
+ nerdamer.delta = delta;
630
726
  nerdamer.Ci = math_1.Ci;
631
727
  nerdamer.Chi = math_1.Chi;
632
728
  nerdamer.Si = math_1.Si;
@@ -635,6 +731,9 @@ nerdamer.Li = math_1.Li;
635
731
  nerdamer.Ei = math_1.Ei;
636
732
  nerdamer.sinc = math_1.sinc;
637
733
  // Symbolic utilities
734
+ nerdamer.parens = math_1.parens;
735
+ nerdamer.continued_fraction = utils_2.continuedFraction;
736
+ nerdamer.scientific = math_1.scientific;
638
737
  nerdamer.contains = math_1.contains;
639
738
  nerdamer.subst = subst_1.subst;
640
739
  nerdamer.uSub = subst_1.uSub;
@@ -642,8 +741,18 @@ nerdamer.uUnSub = subst_1.uUnSub;
642
741
  // Algebra
643
742
  nerdamer.expand = expand_1.expand;
644
743
  nerdamer.factor = factor_1.factor;
744
+ nerdamer.pfactor = factor_1.pfactor;
745
+ nerdamer.pfactord = factor_1.pfactord;
645
746
  nerdamer.polyFactors = factor_1.polyFactors;
646
- nerdamer.completeSquare = utils_1.sqcomp;
747
+ /**
748
+ * Completes the square for a quadratic expression.
749
+ *
750
+ * @example
751
+ * ```ts
752
+ * nerdamer.completeSquare('x^2+6*x+1').expression.text({ sort: true }); // "(3+x)^2-8"
753
+ * ```
754
+ */
755
+ nerdamer.completeSquare = algebra_1.completeSquare;
647
756
  nerdamer.gcd = gcd_1.gcd;
648
757
  nerdamer.lcm = gcd_1.lcm;
649
758
  nerdamer.partfrac = partfrac_1.partfrac;
@@ -653,6 +762,7 @@ nerdamer.simplify = simplify_1.simplify;
653
762
  nerdamer.groebner = groebner_1.groebner;
654
763
  // Solvers
655
764
  nerdamer.solve = solve_1.solve;
765
+ nerdamer.roots = solve_1.roots;
656
766
  nerdamer.solveSystem = solveSystem_1.solveSystem;
657
767
  nerdamer.solveeqs = solveSystem_1.solveSystem;
658
768
  // Calculus
@@ -660,24 +770,36 @@ nerdamer.diff = diff_1.diff;
660
770
  nerdamer.integrate = integrate_1.integrate;
661
771
  nerdamer.laplace = laplace_1.laplace;
662
772
  nerdamer.ilaplace = ilaplace_1.ilaplace;
663
- nerdamer.ilt = ilaplace_1.ilaplace;
773
+ const ilt = ilaplace_1.ilaplace;
774
+ /**
775
+ * Alias for `nerdamer.ilaplace`.
776
+ *
777
+ * @example
778
+ * ```ts
779
+ * nerdamer.ilt('1/(s^2+1)', 's', 't').text();
780
+ * ```
781
+ */
782
+ nerdamer.ilt = ilt;
664
783
  nerdamer.sum = math_1.sum;
665
784
  nerdamer.product = math_1.product;
666
785
  nerdamer.limit = limit_1.limit;
667
- nerdamer.defint = math_1.defint;
786
+ nerdamer.defint = defint_1.defint;
668
787
  nerdamer.S = fresnel_1.S;
669
788
  nerdamer.C = fresnel_1.C;
670
789
  // Matrix operations
671
790
  nerdamer.matrix = math_1.matrix;
672
- nerdamer.imatrix = utils_2.imatrix;
791
+ nerdamer.imatrix = utils_1.imatrix;
673
792
  nerdamer.determinant = functions_1.determinant;
793
+ nerdamer.invert = functions_1.invert;
674
794
  nerdamer.nullspace = functions_1.nullspace;
675
795
  // Vector operations
676
796
  nerdamer.dot = functions_3.dot;
677
797
  nerdamer.cross = functions_3.cross;
798
+ nerdamer.line = geometry_1.line;
678
799
  // Polynomial operations
679
800
  nerdamer.deg = functions_2.deg;
680
801
  nerdamer.content = functions_2.content;
802
+ nerdamer.coeffs = functions_2.coeffs;
681
803
  // Assumptions
682
804
  /**
683
805
  * Registers a process-wide numeric interval assumption.
@@ -689,6 +811,12 @@ nerdamer.content = functions_2.content;
689
811
  * directly can use the documented assumption-domain functions.
690
812
  */
691
813
  nerdamer.assume = assume_1.assume;
814
+ /**
815
+ * Returns a snapshot of all process-wide assumptions currently registered by symbol.
816
+ *
817
+ * Changing the returned Map does not change Nerdamer's active assumptions.
818
+ */
819
+ nerdamer.getAssumptions = assume_1.getAssumptions;
692
820
  // -----------------------------------------------------------------------------
693
821
  // Complete the full-package instance API
694
822
  // -----------------------------------------------------------------------------
@@ -0,0 +1,18 @@
1
+ import { Expression } from '../../core/classes/expression/Expression';
2
+ import type { ExpressionInput } from '../../core/types';
3
+ /**
4
+ * Calculates the definite integral using Adaptive Simpson. Note that this function uses
5
+ * native JS number due to severe computational overhead when implemented with Decimal.js.
6
+ *
7
+ * @param f The function being integrated
8
+ * @param dx The variable of integration
9
+ * @param from The lower limit of the integral
10
+ * @param to The upper limit of the integral
11
+ * @returns The numeric value if possible else a symbolic function
12
+ *
13
+ * @example
14
+ * ```ts
15
+ * defint('cos(x)-x^2+6', 'x', 1, 6); // -42.787553149673464
16
+ * ```
17
+ */
18
+ export declare function defint(f: ExpressionInput, dx: ExpressionInput, from: ExpressionInput, to: ExpressionInput): Expression;
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.defint = defint;
4
+ const Expression_1 = require("../../core/classes/expression/Expression");
5
+ const utils_1 = require("../../core/classes/expression/utils");
6
+ const constants_1 = require("../../core/classes/parser/constants");
7
+ const defintNative_1 = require("./defintNative");
8
+ const NATIVE_DEFINITE_INTEGRATION_PRECISION = 17;
9
+ /**
10
+ * Calculates the definite integral using Adaptive Simpson. Note that this function uses
11
+ * native JS number due to severe computational overhead when implemented with Decimal.js.
12
+ *
13
+ * @param f The function being integrated
14
+ * @param dx The variable of integration
15
+ * @param from The lower limit of the integral
16
+ * @param to The upper limit of the integral
17
+ * @returns The numeric value if possible else a symbolic function
18
+ *
19
+ * @example
20
+ * ```ts
21
+ * defint('cos(x)-x^2+6', 'x', 1, 6); // -42.787553149673464
22
+ * ```
23
+ */
24
+ function defint(f, dx, from, to) {
25
+ let retval;
26
+ f = Expression_1.Expression.create(f);
27
+ dx = Expression_1.Expression.create(dx);
28
+ from = Expression_1.Expression.create(from);
29
+ to = Expression_1.Expression.create(to);
30
+ const inputVars = f.variables();
31
+ // Get the variable
32
+ const v = (0, utils_1.assertPlainVariableAndGetString)(dx);
33
+ // Pull factors that are constant with respect to the integration variable across the bounds.
34
+ if (!inputVars.includes(v)) {
35
+ retval = f.times(to.minus(from));
36
+ }
37
+ else {
38
+ let numericFrom = from;
39
+ let numericTo = to;
40
+ if (!numericFrom.isNUM() && numericFrom.isConstant()) {
41
+ numericFrom = numericFrom.evaluate();
42
+ }
43
+ if (!numericTo.isNUM() && numericTo.isConstant()) {
44
+ numericTo = numericTo.evaluate();
45
+ }
46
+ if (inputVars.length === 1 &&
47
+ inputVars[0] === v &&
48
+ numericFrom.isNUM() &&
49
+ numericTo.isNUM()) {
50
+ const a = Number(numericFrom.getMultiplier().toDecimal());
51
+ const b = Number(numericTo.getMultiplier().toDecimal());
52
+ retval = Expression_1.Expression.create((0, defintNative_1.definiteIntegrateNative)(f.buildFunction(), a, b));
53
+ retval.precision = NATIVE_DEFINITE_INTEGRATION_PRECISION; // Mark it as limited precision
54
+ }
55
+ else {
56
+ retval = Expression_1.Expression.toFunction(constants_1.DEFINT, [f, dx, from, to]);
57
+ }
58
+ }
59
+ return retval;
60
+ }
@@ -5,6 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.definiteIntegrate = definiteIntegrate;
7
7
  const decimal_js_1 = __importDefault(require("decimal.js"));
8
+ const errors_1 = require("../../core/errors");
8
9
  const TWO = new decimal_js_1.default(2);
9
10
  const FOUR = new decimal_js_1.default(4);
10
11
  const SIX = new decimal_js_1.default(6);
@@ -58,12 +59,12 @@ function withFiniteBounds(f, aIn, bIn, opts) {
58
59
  let evals = 0;
59
60
  const evalF = (x) => {
60
61
  if (evals++ > opts.maxEvals) {
61
- throw new Error(`defint: maxEvals exceeded (${opts.maxEvals}).`);
62
+ throw new Error((0, errors_1.message)('defintMaxEvals', { max: String(opts.maxEvals) }));
62
63
  }
63
64
  const y = f(x);
64
65
  if (opts.singular === 'strict') {
65
66
  if (!isFiniteDecimal(y)) {
66
- throw new Error(`defint: non-finite f(x) at x=${x.toString()}`);
67
+ throw new Error((0, errors_1.message)('defintNonFiniteValue', { x: x.toString() }));
67
68
  }
68
69
  }
69
70
  return y;
@@ -127,7 +128,7 @@ function withFiniteBounds(f, aIn, bIn, opts) {
127
128
  !isFiniteDecimal(fr.fm) ||
128
129
  !isFiniteDecimal(fr.fb)) {
129
130
  if (fr.depth >= opts.maxDepth || fr.singularTries >= MAX_SINGULAR_REFINEMENT_ATTEMPTS) {
130
- throw new Error(`defint: singular/non-finite encountered near [${a0.toString()}, ${b0.toString()}]`);
131
+ throw new Error((0, errors_1.message)('defintSingularity', { a: a0.toString(), b: b0.toString() }));
131
132
  }
132
133
  // Push children without using Simpson error test; just refine around the issue.
133
134
  const nextDepth = fr.depth + 1;
@@ -251,7 +252,7 @@ function definiteIntegrate(f, a, b, options = {}) {
251
252
  const isInfA = !A.isFinite() && !A.isNaN();
252
253
  const isInfB = !B.isFinite() && !B.isNaN();
253
254
  if ((isInfA || isInfB) && !allowInfinite) {
254
- throw new Error(`defint: infinite bounds require allowInfinite:true`);
255
+ throw new Error((0, errors_1.message)('defintInfiniteBoundsDecimal'));
255
256
  }
256
257
  const coreOpts = { tolAbs, tolRel, maxDepth, maxEvals, singular };
257
258
  // Handle infinite bounds with standard substitutions:
@@ -299,7 +300,7 @@ function definiteIntegrate(f, a, b, options = {}) {
299
300
  const eps = new decimal_js_1.default(10).pow(-(decimal_js_1.default.precision ?? DEFAULT_DECIMAL_PRECISION) + INFINITE_BOUND_PRECISION_SLACK);
300
301
  return withFiniteBounds(g, eps, ONE.sub(eps), coreOpts);
301
302
  }
302
- throw new Error(`defint: unsupported infinite bound configuration`);
303
+ throw new Error((0, errors_1.message)('defintUnsupportedInfiniteBounds'));
303
304
  }
304
305
  // Finite-bounds path, with optional segmentation by breakpoints
305
306
  if (bps.length === 0) {