nerdamer 1.1.13 → 2.0.0-rc.2

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 (387) hide show
  1. package/BREAKING_CHANGES.md +244 -5
  2. package/LICENSE.md +184 -0
  3. package/README.md +232 -318
  4. package/dist/bundle.js +2 -0
  5. package/dist/bundle.js.LICENSE.txt +7 -0
  6. package/dist/parser.js +2 -0
  7. package/dist/parser.js.LICENSE.txt +7 -0
  8. package/docs-data/parser-functions.json +2248 -0
  9. package/index.d.ts +10 -426
  10. package/output/algebra/adapters.d.ts +3 -0
  11. package/output/algebra/adapters.js +11 -0
  12. package/output/algebra/algorithms/arith.d.ts +84 -0
  13. package/output/algebra/algorithms/arith.js +324 -0
  14. package/output/algebra/algorithms/groebnerBase.d.ts +161 -0
  15. package/output/algebra/algorithms/groebnerBase.js +929 -0
  16. package/output/algebra/dispatch.d.ts +1 -0
  17. package/output/algebra/dispatch.js +25 -0
  18. package/output/algebra/factor/factor.d.ts +77 -0
  19. package/output/algebra/factor/factor.js +245 -0
  20. package/output/algebra/gcd/gcd.d.ts +30 -0
  21. package/output/algebra/gcd/gcd.js +95 -0
  22. package/output/algebra/groebner.d.ts +21 -0
  23. package/output/algebra/groebner.js +36 -0
  24. package/output/algebra/partfrac.d.ts +19 -0
  25. package/output/algebra/partfrac.js +365 -0
  26. package/output/algebra/polynomial/ModularSparsePolynomial.d.ts +131 -0
  27. package/output/algebra/polynomial/ModularSparsePolynomial.js +378 -0
  28. package/output/algebra/polynomial/ModularSparsePolynomialFactor.d.ts +40 -0
  29. package/output/algebra/polynomial/ModularSparsePolynomialFactor.js +661 -0
  30. package/output/algebra/polynomial/SparsePolynomialFactor.d.ts +64 -0
  31. package/output/algebra/polynomial/SparsePolynomialFactor.js +492 -0
  32. package/output/algebra/polynomial/SparsePolynomialGcd.d.ts +29 -0
  33. package/output/algebra/polynomial/SparsePolynomialGcd.js +259 -0
  34. package/output/algebra/polynomial/SparsePolynomialMultivariateFactor.d.ts +82 -0
  35. package/output/algebra/polynomial/SparsePolynomialMultivariateFactor.js +604 -0
  36. package/output/algebra/polynomial/modularGcd.d.ts +40 -0
  37. package/output/algebra/polynomial/modularGcd.js +365 -0
  38. package/output/algebra/polynomialize.d.ts +20 -0
  39. package/output/algebra/polynomialize.js +26 -0
  40. package/output/algebra/simplify/complexsimp.d.ts +7 -0
  41. package/output/algebra/simplify/complexsimp.js +24 -0
  42. package/output/algebra/simplify/factorCommon.d.ts +13 -0
  43. package/output/algebra/simplify/factorCommon.js +136 -0
  44. package/output/algebra/simplify/funcsimp.d.ts +26 -0
  45. package/output/algebra/simplify/funcsimp.js +633 -0
  46. package/output/algebra/simplify/invtrigrewrite.d.ts +10 -0
  47. package/output/algebra/simplify/invtrigrewrite.js +96 -0
  48. package/output/algebra/simplify/ratsimp.d.ts +21 -0
  49. package/output/algebra/simplify/ratsimp.js +140 -0
  50. package/output/algebra/simplify/simplify.d.ts +25 -0
  51. package/output/algebra/simplify/simplify.js +237 -0
  52. package/output/algebra/simplify/trigreduce.d.ts +38 -0
  53. package/output/algebra/simplify/trigreduce.js +424 -0
  54. package/output/algebra/simplify/trigrewrite.d.ts +17 -0
  55. package/output/algebra/simplify/trigrewrite.js +156 -0
  56. package/output/algebra/simplify/trigsimp.d.ts +11 -0
  57. package/output/algebra/simplify/trigsimp.js +369 -0
  58. package/output/algebra/simplify/utils.d.ts +32 -0
  59. package/output/algebra/simplify/utils.js +56 -0
  60. package/output/algebra/utils.d.ts +32 -0
  61. package/output/algebra/utils.js +48 -0
  62. package/output/api/advanced.d.ts +8 -0
  63. package/output/api/advanced.js +18 -0
  64. package/output/api/algebra.d.ts +17 -0
  65. package/output/api/algebra.js +35 -0
  66. package/output/api/assumptions.d.ts +4 -0
  67. package/output/api/assumptions.js +11 -0
  68. package/output/api/calculus.d.ts +10 -0
  69. package/output/api/calculus.js +22 -0
  70. package/output/api/core.d.ts +17 -0
  71. package/output/api/core.js +41 -0
  72. package/output/api/debug.d.ts +16 -0
  73. package/output/api/debug.js +23 -0
  74. package/output/api/languages/deu.d.ts +3 -0
  75. package/output/api/languages/deu.js +266 -0
  76. package/output/api/languages/fra.d.ts +3 -0
  77. package/output/api/languages/fra.js +266 -0
  78. package/output/api/languages/ita.d.ts +3 -0
  79. package/output/api/languages/ita.js +266 -0
  80. package/output/api/languages/nld.d.ts +3 -0
  81. package/output/api/languages/nld.js +266 -0
  82. package/output/api/languages/por.d.ts +3 -0
  83. package/output/api/languages/por.js +266 -0
  84. package/output/api/languages/spa.d.ts +3 -0
  85. package/output/api/languages/spa.js +266 -0
  86. package/output/api/parser.d.ts +93 -0
  87. package/output/api/parser.js +18 -0
  88. package/output/api/solve.d.ts +10 -0
  89. package/output/api/solve.js +17 -0
  90. package/output/api/structures.d.ts +10 -0
  91. package/output/api/structures.js +23 -0
  92. package/output/calculus/adapters.d.ts +8 -0
  93. package/output/calculus/adapters.js +41 -0
  94. package/output/calculus/derivative/diff.d.ts +30 -0
  95. package/output/calculus/derivative/diff.js +241 -0
  96. package/output/calculus/dispatch.d.ts +1 -0
  97. package/output/calculus/dispatch.js +25 -0
  98. package/output/calculus/fresnel.d.ts +16 -0
  99. package/output/calculus/fresnel.js +39 -0
  100. package/output/calculus/integrate/byParts.d.ts +18 -0
  101. package/output/calculus/integrate/byParts.js +339 -0
  102. package/output/calculus/integrate/bySubstitution.d.ts +135 -0
  103. package/output/calculus/integrate/bySubstitution.js +411 -0
  104. package/output/calculus/integrate/integrate.d.ts +38 -0
  105. package/output/calculus/integrate/integrate.js +652 -0
  106. package/output/calculus/integrate/integrationTable.d.ts +2 -0
  107. package/output/calculus/integrate/integrationTable.js +914 -0
  108. package/output/calculus/integrate/utils.d.ts +28 -0
  109. package/output/calculus/integrate/utils.js +96 -0
  110. package/output/calculus/laplace/ilaplace.d.ts +31 -0
  111. package/output/calculus/laplace/ilaplace.js +192 -0
  112. package/output/calculus/laplace/ilaplaceTable.d.ts +2 -0
  113. package/output/calculus/laplace/ilaplaceTable.js +200 -0
  114. package/output/calculus/laplace/laplace.d.ts +22 -0
  115. package/output/calculus/laplace/laplace.js +109 -0
  116. package/output/calculus/laplace/laplaceTable.d.ts +2 -0
  117. package/output/calculus/laplace/laplaceTable.js +187 -0
  118. package/output/calculus/limit/limit.d.ts +35 -0
  119. package/output/calculus/limit/limit.js +1183 -0
  120. package/output/calculus/limit/limitsTable.d.ts +2 -0
  121. package/output/calculus/limit/limitsTable.js +7 -0
  122. package/output/core/Settings.d.ts +32 -0
  123. package/output/core/Settings.js +68 -0
  124. package/output/core/classes/assumption/Assumption.d.ts +218 -0
  125. package/output/core/classes/assumption/Assumption.js +609 -0
  126. package/output/core/classes/assumption/assertiveFunctions.d.ts +6 -0
  127. package/output/core/classes/assumption/assertiveFunctions.js +64 -0
  128. package/output/core/classes/assumption/assume.d.ts +90 -0
  129. package/output/core/classes/assumption/assume.js +145 -0
  130. package/output/core/classes/assumption/dispatch.d.ts +1 -0
  131. package/output/core/classes/assumption/dispatch.js +11 -0
  132. package/output/core/classes/collection/Collection.d.ts +107 -0
  133. package/output/core/classes/collection/Collection.js +240 -0
  134. package/output/core/classes/complex/Complex.d.ts +109 -0
  135. package/output/core/classes/complex/Complex.js +153 -0
  136. package/output/core/classes/decimalSet/DecimalSet.d.ts +226 -0
  137. package/output/core/classes/decimalSet/DecimalSet.js +454 -0
  138. package/output/core/classes/dictionary/Dictionary.d.ts +102 -0
  139. package/output/core/classes/dictionary/Dictionary.js +216 -0
  140. package/output/core/classes/equation/Equation.d.ts +256 -0
  141. package/output/core/classes/equation/Equation.js +350 -0
  142. package/output/core/classes/expression/CoeffObject.d.ts +100 -0
  143. package/output/core/classes/expression/CoeffObject.js +197 -0
  144. package/output/core/classes/expression/Expression.d.ts +1691 -0
  145. package/output/core/classes/expression/Expression.js +2381 -0
  146. package/output/core/classes/expression/analysis.d.ts +25 -0
  147. package/output/core/classes/expression/analysis.js +218 -0
  148. package/output/core/classes/expression/collect.d.ts +9 -0
  149. package/output/core/classes/expression/collect.js +49 -0
  150. package/output/core/classes/expression/format.d.ts +54 -0
  151. package/output/core/classes/expression/format.js +340 -0
  152. package/output/core/classes/expression/products.d.ts +23 -0
  153. package/output/core/classes/expression/products.js +115 -0
  154. package/output/core/classes/expression/shortcuts.d.ts +35 -0
  155. package/output/core/classes/expression/shortcuts.js +129 -0
  156. package/output/core/classes/expression/traversal.d.ts +31 -0
  157. package/output/core/classes/expression/traversal.js +216 -0
  158. package/output/core/classes/expression/trig.d.ts +25 -0
  159. package/output/core/classes/expression/trig.js +40 -0
  160. package/output/core/classes/expression/utils.d.ts +61 -0
  161. package/output/core/classes/expression/utils.js +235 -0
  162. package/output/core/classes/lookupTable/LookupTable.d.ts +12 -0
  163. package/output/core/classes/lookupTable/LookupTable.js +55 -0
  164. package/output/core/classes/matrix/Matrix.d.ts +227 -0
  165. package/output/core/classes/matrix/Matrix.js +901 -0
  166. package/output/core/classes/matrix/Sylvester.d.ts +11 -0
  167. package/output/core/classes/matrix/Sylvester.js +54 -0
  168. package/output/core/classes/matrix/dispatch.d.ts +1 -0
  169. package/output/core/classes/matrix/dispatch.js +19 -0
  170. package/output/core/classes/matrix/functions.d.ts +28 -0
  171. package/output/core/classes/matrix/functions.js +57 -0
  172. package/output/core/classes/matrix/utils.d.ts +9 -0
  173. package/output/core/classes/matrix/utils.js +22 -0
  174. package/output/core/classes/parser/Parser.d.ts +493 -0
  175. package/output/core/classes/parser/Parser.js +1863 -0
  176. package/output/core/classes/parser/Token.d.ts +58 -0
  177. package/output/core/classes/parser/Token.js +137 -0
  178. package/output/core/classes/parser/constants.d.ts +162 -0
  179. package/output/core/classes/parser/constants.js +229 -0
  180. package/output/core/classes/parser/controlFlowSignals.d.ts +38 -0
  181. package/output/core/classes/parser/controlFlowSignals.js +60 -0
  182. package/output/core/classes/parser/helpers.d.ts +21 -0
  183. package/output/core/classes/parser/helpers.js +42 -0
  184. package/output/core/classes/parser/operations/add.d.ts +15 -0
  185. package/output/core/classes/parser/operations/add.js +236 -0
  186. package/output/core/classes/parser/operations/comma.d.ts +7 -0
  187. package/output/core/classes/parser/operations/comma.js +11 -0
  188. package/output/core/classes/parser/operations/compare.d.ts +21 -0
  189. package/output/core/classes/parser/operations/compare.js +474 -0
  190. package/output/core/classes/parser/operations/divide.d.ts +2 -0
  191. package/output/core/classes/parser/operations/divide.js +72 -0
  192. package/output/core/classes/parser/operations/functions.d.ts +46 -0
  193. package/output/core/classes/parser/operations/functions.js +438 -0
  194. package/output/core/classes/parser/operations/multiply.d.ts +11 -0
  195. package/output/core/classes/parser/operations/multiply.js +328 -0
  196. package/output/core/classes/parser/operations/power.d.ts +48 -0
  197. package/output/core/classes/parser/operations/power.js +673 -0
  198. package/output/core/classes/parser/operations/subtract.d.ts +3 -0
  199. package/output/core/classes/parser/operations/subtract.js +36 -0
  200. package/output/core/classes/parser/preprocess.d.ts +7 -0
  201. package/output/core/classes/parser/preprocess.js +246 -0
  202. package/output/core/classes/parser/scripting/controlFlow.d.ts +23 -0
  203. package/output/core/classes/parser/scripting/controlFlow.js +279 -0
  204. package/output/core/classes/parser/scripting/deferred.d.ts +4 -0
  205. package/output/core/classes/parser/scripting/deferred.js +65 -0
  206. package/output/core/classes/parser/scripting/dispatch.d.ts +1 -0
  207. package/output/core/classes/parser/scripting/dispatch.js +62 -0
  208. package/output/core/classes/parser/scripting/evaluate.d.ts +23 -0
  209. package/output/core/classes/parser/scripting/evaluate.js +128 -0
  210. package/output/core/classes/parser/scripting/functions.d.ts +14 -0
  211. package/output/core/classes/parser/scripting/functions.js +59 -0
  212. package/output/core/classes/parser/scripting/scope.d.ts +8 -0
  213. package/output/core/classes/parser/scripting/scope.js +132 -0
  214. package/output/core/classes/parser/types.d.ts +130 -0
  215. package/output/core/classes/parser/types.js +2 -0
  216. package/output/core/classes/parser/wrappers/IndexedReference.d.ts +31 -0
  217. package/output/core/classes/parser/wrappers/IndexedReference.js +68 -0
  218. package/output/core/classes/parser/wrappers/KeyValuePair.d.ts +24 -0
  219. package/output/core/classes/parser/wrappers/KeyValuePair.js +51 -0
  220. package/output/core/classes/polynomial/Polynomial.d.ts +504 -0
  221. package/output/core/classes/polynomial/Polynomial.js +1195 -0
  222. package/output/core/classes/polynomial/SparsePolynomial.d.ts +221 -0
  223. package/output/core/classes/polynomial/SparsePolynomial.js +824 -0
  224. package/output/core/classes/polynomial/SparsePolynomialAdapter.d.ts +56 -0
  225. package/output/core/classes/polynomial/SparsePolynomialAdapter.js +241 -0
  226. package/output/core/classes/polynomial/Term.d.ts +222 -0
  227. package/output/core/classes/polynomial/Term.js +430 -0
  228. package/output/core/classes/polynomial/adapters.d.ts +18 -0
  229. package/output/core/classes/polynomial/adapters.js +33 -0
  230. package/output/core/classes/polynomial/dispatch.d.ts +1 -0
  231. package/output/core/classes/polynomial/dispatch.js +14 -0
  232. package/output/core/classes/polynomial/functions.d.ts +77 -0
  233. package/output/core/classes/polynomial/functions.js +189 -0
  234. package/output/core/classes/polynomial/utils.d.ts +62 -0
  235. package/output/core/classes/polynomial/utils.js +207 -0
  236. package/output/core/classes/rational/Rational.d.ts +501 -0
  237. package/output/core/classes/rational/Rational.js +829 -0
  238. package/output/core/classes/seq/SEQ.d.ts +13 -0
  239. package/output/core/classes/seq/SEQ.js +137 -0
  240. package/output/core/classes/valuesSet/ValuesSet.d.ts +187 -0
  241. package/output/core/classes/valuesSet/ValuesSet.js +399 -0
  242. package/output/core/classes/vector/Vector.d.ts +222 -0
  243. package/output/core/classes/vector/Vector.js +501 -0
  244. package/output/core/classes/vector/dispatch.d.ts +1 -0
  245. package/output/core/classes/vector/dispatch.js +11 -0
  246. package/output/core/classes/vector/functions.d.ts +28 -0
  247. package/output/core/classes/vector/functions.js +47 -0
  248. package/output/core/common/classes/MathematicalAggregate.d.ts +53 -0
  249. package/output/core/common/classes/MathematicalAggregate.js +149 -0
  250. package/output/core/common/classes/Scope.d.ts +62 -0
  251. package/output/core/common/classes/Scope.js +122 -0
  252. package/output/core/common/classes/StructuredEntity.d.ts +55 -0
  253. package/output/core/common/classes/StructuredEntity.js +151 -0
  254. package/output/core/common/common.d.ts +62 -0
  255. package/output/core/common/common.js +74 -0
  256. package/output/core/common/functions/functions.d.ts +14 -0
  257. package/output/core/common/functions/functions.js +33 -0
  258. package/output/core/common/functions/structuredEntityUtils.d.ts +27 -0
  259. package/output/core/common/functions/structuredEntityUtils.js +40 -0
  260. package/output/core/converters/BaseConverter.d.ts +97 -0
  261. package/output/core/converters/BaseConverter.js +405 -0
  262. package/output/core/converters/Converter.d.ts +111 -0
  263. package/output/core/converters/Converter.js +806 -0
  264. package/output/core/converters/Pattern.d.ts +71 -0
  265. package/output/core/converters/Pattern.js +302 -0
  266. package/output/core/dispatch.d.ts +52 -0
  267. package/output/core/dispatch.js +26 -0
  268. package/output/core/errors.d.ts +316 -0
  269. package/output/core/errors.js +349 -0
  270. package/output/core/fullFunctions.d.ts +7 -0
  271. package/output/core/fullFunctions.js +31 -0
  272. package/output/core/functions/bigint/bigint.d.ts +133 -0
  273. package/output/core/functions/bigint/bigint.js +444 -0
  274. package/output/core/functions/bigint/primeFactor.d.ts +51 -0
  275. package/output/core/functions/bigint/primeFactor.js +267 -0
  276. package/output/core/functions/bigint/primes.d.ts +1 -0
  277. package/output/core/functions/bigint/primes.js +11 -0
  278. package/output/core/functions/build/definitions.d.ts +12 -0
  279. package/output/core/functions/build/definitions.js +139 -0
  280. package/output/core/functions/build/index.d.ts +32 -0
  281. package/output/core/functions/build/index.js +136 -0
  282. package/output/core/functions/complex.d.ts +90 -0
  283. package/output/core/functions/complex.dispatch.d.ts +1 -0
  284. package/output/core/functions/complex.dispatch.js +16 -0
  285. package/output/core/functions/complex.js +482 -0
  286. package/output/core/functions/decimal.d.ts +24 -0
  287. package/output/core/functions/decimal.js +665 -0
  288. package/output/core/functions/expand/expand.d.ts +42 -0
  289. package/output/core/functions/expand/expand.js +376 -0
  290. package/output/core/functions/fresnelNumeric.d.ts +12 -0
  291. package/output/core/functions/fresnelNumeric.js +123 -0
  292. package/output/core/functions/numeric.d.ts +140 -0
  293. package/output/core/functions/numeric.js +790 -0
  294. package/output/core/functions/rationalNormalization.d.ts +11 -0
  295. package/output/core/functions/rationalNormalization.js +117 -0
  296. package/output/core/functions/setFunction.d.ts +19 -0
  297. package/output/core/functions/setFunction.js +75 -0
  298. package/output/core/functions/string.d.ts +26 -0
  299. package/output/core/functions/string.js +102 -0
  300. package/output/core/functions/subst.d.ts +90 -0
  301. package/output/core/functions/subst.js +506 -0
  302. package/output/core/functions/utils.d.ts +24 -0
  303. package/output/core/functions/utils.js +51 -0
  304. package/output/core/parserFunctions.d.ts +7 -0
  305. package/output/core/parserFunctions.js +25 -0
  306. package/output/core/types.d.ts +48 -0
  307. package/output/core/types.js +2 -0
  308. package/output/index.d.ts +359 -0
  309. package/output/index.js +739 -0
  310. package/output/math/defint/defint.d.ts +18 -0
  311. package/output/math/defint/defint.js +60 -0
  312. package/output/math/defint/defintDecimal.d.ts +37 -0
  313. package/output/math/defint/defintDecimal.js +321 -0
  314. package/output/math/defint/defintNative.d.ts +57 -0
  315. package/output/math/defint/defintNative.js +281 -0
  316. package/output/math/dispatch.d.ts +1 -0
  317. package/output/math/dispatch.js +101 -0
  318. package/output/math/geometry.d.ts +12 -0
  319. package/output/math/geometry.js +55 -0
  320. package/output/math/math.d.ts +695 -0
  321. package/output/math/math.js +1955 -0
  322. package/output/math/trig.d.ts +518 -0
  323. package/output/math/trig.js +1444 -0
  324. package/output/math/trunc.d.ts +19 -0
  325. package/output/math/trunc.js +36 -0
  326. package/output/math/utils.d.ts +66 -0
  327. package/output/math/utils.js +219 -0
  328. package/output/solve/classes/DecimalMatrix.d.ts +17 -0
  329. package/output/solve/classes/DecimalMatrix.js +86 -0
  330. package/output/solve/classes/FunctionSolver.d.ts +135 -0
  331. package/output/solve/classes/FunctionSolver.js +433 -0
  332. package/output/solve/classes/MultivariateSolver.d.ts +84 -0
  333. package/output/solve/classes/MultivariateSolver.js +240 -0
  334. package/output/solve/classes/PolynomialSolver.d.ts +104 -0
  335. package/output/solve/classes/PolynomialSolver.js +492 -0
  336. package/output/solve/classes/SolutionSet.d.ts +172 -0
  337. package/output/solve/classes/SolutionSet.js +434 -0
  338. package/output/solve/classes/Solver.d.ts +17 -0
  339. package/output/solve/classes/Solver.js +132 -0
  340. package/output/solve/classes/SymbolicSolver.d.ts +74 -0
  341. package/output/solve/classes/SymbolicSolver.js +601 -0
  342. package/output/solve/dispatch.d.ts +1 -0
  343. package/output/solve/dispatch.js +13 -0
  344. package/output/solve/linsolve.d.ts +53 -0
  345. package/output/solve/linsolve.js +233 -0
  346. package/output/solve/solve.d.ts +44 -0
  347. package/output/solve/solve.js +368 -0
  348. package/output/solve/solveSystem.d.ts +31 -0
  349. package/output/solve/solveSystem.js +266 -0
  350. package/output/solve/utils.d.ts +10 -0
  351. package/output/solve/utils.js +58 -0
  352. package/output/utils/array.d.ts +42 -0
  353. package/output/utils/array.js +98 -0
  354. package/output/utils/debug.d.ts +131 -0
  355. package/output/utils/debug.js +296 -0
  356. package/output/utils/decimal.d.ts +3 -0
  357. package/output/utils/decimal.js +16 -0
  358. package/output/utils/numeric.d.ts +14 -0
  359. package/output/utils/numeric.js +51 -0
  360. package/output/utils/object.d.ts +26 -0
  361. package/output/utils/object.js +56 -0
  362. package/package.json +178 -57
  363. package/.travis.yml +0 -3
  364. package/Algebra.js +0 -4568
  365. package/CODE_OF_CONDUCT.md +0 -46
  366. package/CONTRIBUTING.md +0 -14
  367. package/Calculus.js +0 -2675
  368. package/Extra.js +0 -622
  369. package/Solve.js +0 -1783
  370. package/all.js +0 -16
  371. package/all.min.js +0 -1
  372. package/gulpfile.js +0 -16
  373. package/index.html +0 -158
  374. package/license.txt +0 -19
  375. package/nerdamer.core.js +0 -12510
  376. package/spec/LaTeX.spec.js +0 -302
  377. package/spec/TeXConvert.spec.js +0 -8
  378. package/spec/algebra.spec.js +0 -287
  379. package/spec/basic_parser.spec.js +0 -134
  380. package/spec/build.spec.js +0 -131
  381. package/spec/calculus.spec.js +0 -183
  382. package/spec/core.spec.js +0 -2970
  383. package/spec/extra.spec.js +0 -54
  384. package/spec/solve.spec.js +0 -126
  385. package/spec/support/jasmine.json +0 -11
  386. package/spec/support/utils.js +0 -42
  387. package/spec/text.spec.js +0 -132
@@ -0,0 +1,695 @@
1
+ import { Expression } from '../core/classes/expression/Expression';
2
+ import { Matrix } from '../core/classes/matrix/Matrix';
3
+ import type { Dictionary } from '../core/classes/dictionary/Dictionary';
4
+ import type { ValuesSet } from '../core/classes/valuesSet/ValuesSet';
5
+ import type { Vector } from '../core/classes/vector/Vector';
6
+ import type { ExpressionInput, NerdamerInput } from '../core/types';
7
+ import type { SolutionSet } from '../solve/classes/SolutionSet';
8
+ /**
9
+ * Computes the square root of an expression. Equivalent to raising to the power of 1/2.
10
+ * Nested square roots are automatically simplified (e.g. `sqrt(sqrt(x))` becomes `x^(1/4)`).
11
+ *
12
+ * @param x - The expression to take the square root of.
13
+ * @returns The square root of `x`.
14
+ * @throws {@link core!UndefinedError} If `x` is `-∞`.
15
+ *
16
+ * @example
17
+ * ```ts
18
+ * // Numeric
19
+ * sqrt(4).text() // "2"
20
+ * sqrt('1/4').text() // "1/2"
21
+ *
22
+ * // Symbolic
23
+ * sqrt('x^2').text() // "x"
24
+ * sqrt('x').text() // "sqrt(x)"
25
+ * sqrt(0).text() // "0"
26
+ * ```
27
+ */
28
+ export declare function sqrt(x: ExpressionInput): Expression;
29
+ /**
30
+ * Returns a copy that renders numeric values in scientific notation.
31
+ *
32
+ * The legacy implementation stored a formatting flag that its formatter did not
33
+ * consume. Nerdamer 2.0 keeps the expression exact and records the requested number
34
+ * of significant digits for formatting. Precision validation follows decimal.js and accepts
35
+ * integer values from 1 through 1e9.
36
+ */
37
+ export declare function scientific(x: ExpressionInput, significantDigits?: ExpressionInput): Expression;
38
+ /**
39
+ * Computes the nth root of an expression as its principal power.
40
+ *
41
+ * @param x - The expression whose root is requested.
42
+ * @param n - The root degree.
43
+ * @returns `x^(1/n)`.
44
+ */
45
+ export declare function nthroot(x: ExpressionInput, n: ExpressionInput): Expression;
46
+ /** Converts degrees to radians exactly. */
47
+ export declare function radians(x: ExpressionInput): Expression;
48
+ /** Converts radians to degrees exactly. */
49
+ export declare function degrees(x: ExpressionInput): Expression;
50
+ /** Returns the base-10 logarithm using the ordinary logarithm implementation. */
51
+ export declare function log10(x: ExpressionInput): Expression;
52
+ /**
53
+ * Computes the cube root of an expression.
54
+ *
55
+ * For real numeric constants, the *real* cube root is returned (so negative reals stay real).
56
+ * For complex constants, the principal cube root is used.
57
+ * Nested cube roots are simplified (e.g. `cbrt(cbrt(x))` becomes `x^(1/9)`).
58
+ *
59
+ * Unlike {@link sqrt}, `cbrt` is preserved as a function node rather than rewritten to
60
+ * `x^(1/3)` to avoid principal-branch issues during symbolic manipulation.
61
+ *
62
+ * @param x - The expression to take the cube root of.
63
+ * @returns The cube root of `x`.
64
+ *
65
+ * @example
66
+ * ```ts
67
+ * cbrt(8).text() // "2"
68
+ * cbrt(-27).text() // "-3"
69
+ * cbrt('x').text() // "cbrt(x)"
70
+ * ```
71
+ */
72
+ export declare function cbrt(x: ExpressionInput): Expression;
73
+ /**
74
+ * Wraps an expression in parentheses. Returns a function node whose only purpose
75
+ * is to visually group `x` with surrounding parentheses in output.
76
+ *
77
+ * @param x - The expression to wrap.
78
+ * @returns A parenthesised form of `x`.
79
+ *
80
+ * @example
81
+ * ```ts
82
+ * parens(Expression.create('x+1')).text() // "(x+1)"
83
+ * ```
84
+ */
85
+ export declare function parens(x: ExpressionInput): Expression;
86
+ /**
87
+ * Computes the Fibonacci number for an integer index.
88
+ *
89
+ * Integer inputs are evaluated exactly, including negative indices through the
90
+ * negafibonacci identity. Symbolic and non-integer inputs remain unevaluated.
91
+ *
92
+ * @param x - Fibonacci index.
93
+ * @returns The exact Fibonacci number for an integer input, or symbolic `fib(x)`.
94
+ *
95
+ * @example
96
+ * ```ts
97
+ * fibonacci(10).text() // "55"
98
+ * fibonacci(-4).text() // "-3"
99
+ * fibonacci('x').text() // "fib(x)"
100
+ * ```
101
+ */
102
+ export declare function fibonacci(x: ExpressionInput): Expression;
103
+ /**
104
+ * Computes the factorial of an expression.
105
+ *
106
+ * For non-negative integers, returns the exact integer factorial.
107
+ * For half-integer arguments (e.g. `1/2`, `3/2`, `-1/2`), returns a closed-form
108
+ * expression involving `sqrt(π)`.
109
+ * When `Settings.EVALUATE` is `true` and the input is not an integer, falls back
110
+ * to the {@link gamma} function via Γ(x + 1).
111
+ *
112
+ * @param x - The expression to compute the factorial of.
113
+ * @returns The factorial of `x`.
114
+ * @throws {@link core!UndefinedError} If `x` is `-∞`.
115
+ *
116
+ * @example
117
+ * ```ts
118
+ * factorial(Expression.create(5)).text() // "120"
119
+ * factorial(Expression.create(0)).text() // "1"
120
+ * factorial(Expression.create('1/2')).text() // "1/2*sqrt(pi)"
121
+ * ```
122
+ */
123
+ export declare function factorial(x: Expression): Expression;
124
+ /**
125
+ * Computes the double factorial of an expression.
126
+ *
127
+ * For a non-negative integer n, the double factorial is the product of all positive
128
+ * integers up to n that share its parity:
129
+ * - Even: `n!! = 2 · 4 · 6 · … · n`
130
+ * - Odd: `n!! = 1 · 3 · 5 · … · n`
131
+ *
132
+ * For non-integer arguments when `Settings.EVALUATE` is `true`, a generalised
133
+ * formula using the {@link gamma} function is applied.
134
+ *
135
+ * @param x - The expression to compute the double factorial of.
136
+ * @returns The double factorial of `x`.
137
+ * @throws {@link core!UndefinedError} If `x` is `-∞`.
138
+ *
139
+ * @example
140
+ * ```ts
141
+ * doubleFactorial(Expression.create(6)).text() // "48"
142
+ * doubleFactorial(Expression.create(7)).text() // "105"
143
+ * ```
144
+ */
145
+ export declare function doubleFactorial(x: Expression): Expression;
146
+ /**
147
+ * Computes the Heaviside step function (unit step function).
148
+ *
149
+ * Uses the half-maximum convention at the origin:
150
+ * - `heaviside(x) = 0` for `x < 0`
151
+ * - `heaviside(0) = 1/2`
152
+ * - `heaviside(x) = 1` for `x > 0`
153
+ *
154
+ * For symbolic inputs, returns an unevaluated `heaviside(x)` node.
155
+ *
156
+ * @param x - The input expression.
157
+ * @returns The Heaviside step value.
158
+ *
159
+ * @example
160
+ * ```ts
161
+ * heaviside(Expression.create(3)).text() // "1"
162
+ * heaviside(Expression.create(-2)).text() // "0"
163
+ * heaviside(Expression.create(0)).text() // "1/2"
164
+ * heaviside(Expression.create('t')).text() // "heaviside(t)"
165
+ * ```
166
+ */
167
+ export declare function heaviside(x: Expression): Expression;
168
+ /**
169
+ * Legacy unit-step function. Unlike {@link heaviside}, the value at zero is 1.
170
+ */
171
+ export declare function step(x: ExpressionInput): Expression;
172
+ /**
173
+ * Rectangular pulse with unit width centered at zero.
174
+ *
175
+ * Returns 1 for |x| < 1/2, 1/2 at |x| = 1/2, and 0 for |x| > 1/2.
176
+ */
177
+ export declare function rect(x: ExpressionInput): Expression;
178
+ /** Triangular pulse: max(1 - |x|, 0) when the comparison can be resolved. */
179
+ export declare function tri(x: ExpressionInput): Expression;
180
+ /**
181
+ * Computes the Dirac delta function (distribution).
182
+ *
183
+ * For non-zero numeric inputs, returns `0`. At `x = 0` the symbolic form
184
+ * `dirac(0)` is returned (the Dirac delta is only meaningful under an
185
+ * integral or Laplace transform). For symbolic inputs, returns an
186
+ * unevaluated `dirac(x)` node.
187
+ *
188
+ * @param x - The input expression.
189
+ * @returns The Dirac delta value or symbolic node.
190
+ *
191
+ * @example
192
+ * ```ts
193
+ * dirac(Expression.create(5)).text() // "0"
194
+ * dirac(Expression.create(0)).text() // "dirac(0)"
195
+ * dirac(Expression.create('t')).text() // "dirac(t)"
196
+ * ```
197
+ */
198
+ export declare function dirac(x: Expression): Expression;
199
+ /**
200
+ * Evaluates a numeric expression to a finite number of significant decimal digits.
201
+ *
202
+ * Exact rational results are converted to decimal-origin values so subsequent numerical
203
+ * arithmetic does not keep expanding their numerators and denominators. Symbolic results
204
+ * remain symbolic after evaluation.
205
+ *
206
+ * @param x - Expression to evaluate numerically.
207
+ * @param precision - Significant digits to retain. Defaults to the active Nerdamer precision.
208
+ * @returns The evaluated numeric value at the requested precision, or the evaluated symbolic result.
209
+ */
210
+ export declare function numeric(x: ExpressionInput, precision?: ExpressionInput): Expression;
211
+ /**
212
+ * Rounds a number to the nth decimal place. If no precision is provided, rounds to
213
+ * the nearest integer.
214
+ *
215
+ * @param x - The expression to round.
216
+ * @param n - The number of decimal places to round. Defaults to `0`.
217
+ * @returns The rounded value of `x`.
218
+ *
219
+ * @example
220
+ * ```ts
221
+ * round('3.7').text() // "4"
222
+ * round('2.555', 2).text() // "2.56"
223
+ * round('1/3', 4).text() // "0.3333"
224
+ * ```
225
+ */
226
+ export declare function round(x: ExpressionInput, n?: ExpressionInput): Expression;
227
+ /**
228
+ * Returns the sign of a number as `1`, `-1`, or `0`.
229
+ *
230
+ * For constant expressions that are not plain numerics, the expression is
231
+ * evaluated first to determine its sign.
232
+ *
233
+ * @param x - The expression whose sign to determine.
234
+ * @returns `1`, `-1`, or `0` as an Expression, or a symbolic `sign(x)` node.
235
+ *
236
+ * @example
237
+ * ```ts
238
+ * sign(5).text() // "1"
239
+ * sign(-3).text() // "-1"
240
+ * sign(0).text() // "0"
241
+ * sign('x').text() // "sign(x)"
242
+ * ```
243
+ */
244
+ export declare function sign(x: ExpressionInput): Expression;
245
+ /**
246
+ * Rounds a number down to the nearest integer (floor function).
247
+ *
248
+ * @param x - The expression to round down.
249
+ * @returns The greatest integer less than or equal to `x`.
250
+ *
251
+ * @example
252
+ * ```ts
253
+ * floor('3.7').text() // "3"
254
+ * floor('-2.3').text() // "-3"
255
+ * floor(5).text() // "5"
256
+ * floor('x').text() // "floor(x)"
257
+ * ```
258
+ */
259
+ export declare function floor(x: ExpressionInput): Expression;
260
+ /**
261
+ * Rounds a number up to the nearest integer (ceiling function).
262
+ *
263
+ * @param x - The expression to round up.
264
+ * @returns The least integer greater than or equal to `x`.
265
+ *
266
+ * @example
267
+ * ```ts
268
+ * ceiling('3.2').text() // "4"
269
+ * ceiling('-2.7').text() // "-2"
270
+ * ceiling(5).text() // "5"
271
+ * ceiling('x').text() // "ceil(x)"
272
+ * ```
273
+ */
274
+ export declare function ceiling(x: ExpressionInput): Expression;
275
+ /**
276
+ * Computes the absolute value of an expression.
277
+ *
278
+ * Applies symbolic simplifications where possible:
279
+ * - Even powers are recognised as non-negative (e.g. `abs(x^2)` returns `x^2`).
280
+ * - Complex inputs use the modulus: `abs(a + bi) = sqrt(a² + b²)`.
281
+ * - Fully negative sums are negated (e.g. `abs(-x - y)` becomes `x + y`).
282
+ *
283
+ * @param x - The expression to take the absolute value of.
284
+ * @returns The absolute value of `x`.
285
+ *
286
+ * @example
287
+ * ```ts
288
+ * abs(-5).text() // "5"
289
+ * abs('3/4').text() // "3/4"
290
+ * abs('x^2').text() // "x^2"
291
+ * abs('x').text() // "abs(x)"
292
+ * ```
293
+ */
294
+ export declare function abs(x: ExpressionInput): Expression;
295
+ /**
296
+ * Computes the modular multiplicative inverse of `a` modulo `p` using the
297
+ * extended Euclidean algorithm. That is, finds `t` such that `a * t ≡ 1 (mod p)`.
298
+ *
299
+ * @param a - The number whose modular inverse is to be calculated.
300
+ * @param p - The modulus (typically prime).
301
+ * @returns The modular inverse of `a` mod `p`.
302
+ * @throws {@link core!MathError} If the inverse does not exist (i.e. `gcd(a, p) ≠ 1`).
303
+ *
304
+ * @example
305
+ * ```ts
306
+ * modInv(Expression.create(3), Expression.create(7)).text() // "5"
307
+ * modInv(Expression.create(10), Expression.create(17)).text() // "12"
308
+ * ```
309
+ */
310
+ export declare function modInv(a: Expression, p: Expression): Expression;
311
+ /**
312
+ * Computes the modulo (remainder) of `x` divided by `y`.
313
+ *
314
+ * Exact Gaussian integers use the same quotient rule as Wolfram Language:
315
+ * divide, round the real and imaginary quotient components independently to
316
+ * the nearest integers with midpoint ties going to even, then subtract
317
+ * `y * quotient` from `x`.
318
+ *
319
+ * Complex values outside the Gaussian integers remain symbolic.
320
+ *
321
+ * @see https://reference.wolfram.com/language/ref/Mod.html
322
+ * @see https://reference.wolfram.com/language/ref/Quotient.html
323
+ * @see https://reference.wolfram.com/language/ref/Round.html
324
+ *
325
+ * @param x - The dividend.
326
+ * @param y - The divisor.
327
+ * @returns The remainder of `x / y`.
328
+ * @throws {@link core!UndefinedError} If either `x` or `y` is `±∞`.
329
+ *
330
+ * @example
331
+ * ```ts
332
+ * mod(Expression.create(10), Expression.create(3)).text() // "1"
333
+ * mod(Expression.create('5+3*i'), Expression.create('2+i')).text() // "-1"
334
+ * ```
335
+ */
336
+ export declare function mod(x: Expression, y: Expression): Expression;
337
+ /**
338
+ * Upper incomplete gamma Γ(a, z).
339
+ *
340
+ * Positive integer first arguments are expanded exactly using the finite-sum formula.
341
+ * Other inputs remain symbolic.
342
+ *
343
+ * @see https://dlmf.nist.gov/8.4.E8
344
+ */
345
+ export declare function gammaIncomplete(a: ExpressionInput, z: ExpressionInput): Expression;
346
+ /**
347
+ * Lower incomplete gamma γ(a, z).
348
+ *
349
+ * Positive integer first arguments use γ(a,z) = Γ(a) - Γ(a,z).
350
+ * Other inputs remain symbolic.
351
+ *
352
+ * @see https://dlmf.nist.gov/8.2.E3
353
+ */
354
+ export declare function gammaIncompleteLower(a: ExpressionInput, z: ExpressionInput): Expression;
355
+ /**
356
+ * Computes the gamma function Γ(x).
357
+ *
358
+ * - For positive integers: `Γ(n) = (n − 1)!`
359
+ * - For half-integers (e.g. `1/2`, `3/2`, `-3/2`): returns a closed-form
360
+ * expression involving `sqrt(π)`.
361
+ * - For other numeric values: uses a high-precision decimal approximation.
362
+ * - For symbolic inputs: returns an unevaluated `gamma(x)` node.
363
+ *
364
+ * @param x - The input expression.
365
+ * @returns The gamma function value Γ(x).
366
+ * @throws {@link core!UndefinedError} If `x` is `-∞`.
367
+ *
368
+ * @see https://en.wikipedia.org/wiki/Gamma_function
369
+ *
370
+ * @example
371
+ * ```ts
372
+ * gamma(Expression.create(5)).text() // "24"
373
+ * gamma(Expression.create('1/2')).text() // "sqrt(pi)"
374
+ * gamma(Expression.create('x')).text() // "gamma(x)"
375
+ * ```
376
+ */
377
+ export declare function gamma(x: Expression): Expression;
378
+ /**
379
+ * Computes the complementary error function: `erfc(x) = 1 − erf(x)`.
380
+ *
381
+ * @param x - The input expression.
382
+ * @returns The complementary error function value.
383
+ *
384
+ * @see {@link erf}
385
+ *
386
+ * @example
387
+ * ```ts
388
+ * erfc(Expression.create(0)).text() // "0"
389
+ * ```
390
+ */
391
+ export declare function erfc(x: Expression): Expression;
392
+ /**
393
+ * Computes the error function erf(x).
394
+ *
395
+ * - `erf(+∞) = 1`, `erf(−∞) = −1`
396
+ * - For numeric inputs, returns a high-precision decimal approximation.
397
+ * - For symbolic inputs, returns an unevaluated `erf(x)` node.
398
+ *
399
+ * @param x - The input expression.
400
+ * @returns The error function value.
401
+ *
402
+ * @see https://en.wikipedia.org/wiki/Error_function
403
+ *
404
+ * @example
405
+ * ```ts
406
+ * erf(Expression.create(0)).text() // "0"
407
+ * erf(Expression.create('x')).text() // "erf(x)"
408
+ * ```
409
+ */
410
+ export declare function erf(x: Expression): Expression;
411
+ /**
412
+ * Computes the normalized sinc function: `sinc(x) = sin(x) / x`.
413
+ *
414
+ * By convention, `sinc(0) = 1` (the removable singularity).
415
+ * The function is even: `sinc(-x) = sinc(x)`.
416
+ *
417
+ * @param x - The input expression.
418
+ * @returns The sinc function value.
419
+ *
420
+ * @example
421
+ * ```ts
422
+ * sinc(Expression.create(0)).text() // "1"
423
+ * sinc(Expression.create('x')).text() // "sinc(x)"
424
+ * ```
425
+ */
426
+ export declare function sinc(x: Expression): Expression;
427
+ /**
428
+ * Computes the sine integral: `Si(x) = ∫₀ˣ sin(t)/t dt`.
429
+ *
430
+ * - `Si(+∞) = π/2`, `Si(−∞) = −π/2`
431
+ * - `Si(0) = 0`
432
+ * - The function is odd: `Si(-x) = -Si(x)`.
433
+ *
434
+ * @param x - The input expression.
435
+ * @returns The sine integral value.
436
+ *
437
+ * @example
438
+ * ```ts
439
+ * Si(Expression.create(0)).text() // "0"
440
+ * Si(Expression.create('x')).text() // "Si(x)"
441
+ * ```
442
+ */
443
+ export declare function Si(x: Expression): Expression;
444
+ /**
445
+ * Computes the hyperbolic sine integral: `Shi(x) = ∫₀ˣ sinh(t)/t dt`.
446
+ *
447
+ * - `Shi(+∞) = +∞`, `Shi(−∞) = −∞`
448
+ * - `Shi(0) = 0`
449
+ * - The function is odd: `Shi(-x) = -Shi(x)`.
450
+ *
451
+ * @param x - The input expression.
452
+ * @returns The hyperbolic sine integral value.
453
+ *
454
+ * @example
455
+ * ```ts
456
+ * Shi(Expression.create(0)).text() // "0"
457
+ * Shi(Expression.create('x')).text() // "Shi(x)"
458
+ * ```
459
+ */
460
+ export declare function Shi(x: Expression): Expression;
461
+ /**
462
+ * Computes the cosine integral: `Ci(x) = γ + ln(x) + ∫₀ˣ (cos(t)−1)/t dt`,
463
+ * where γ is the Euler–Mascheroni constant.
464
+ *
465
+ * - `Ci(+∞) = 0`, `Ci(−∞) = 0`
466
+ * - `Ci(0) = −∞`
467
+ * - The function is even for the principal branch: `Ci(-x) = Ci(x)`.
468
+ *
469
+ * @param x - The input expression.
470
+ * @returns The cosine integral value.
471
+ *
472
+ * @example
473
+ * ```ts
474
+ * Ci(Expression.create('x')).text() // "Ci(x)"
475
+ * ```
476
+ */
477
+ export declare function Ci(x: Expression): Expression;
478
+ /**
479
+ * Computes the hyperbolic cosine integral: `Chi(x) = γ + ln(x) + ∫₀ˣ (cosh(t)−1)/t dt`,
480
+ * where γ is the Euler–Mascheroni constant.
481
+ *
482
+ * - `Chi(±∞) = +∞`
483
+ * - `Chi(0) = −∞`
484
+ * - The function is even for the principal branch: `Chi(-x) = Chi(x)`.
485
+ *
486
+ * @param x - The input expression.
487
+ * @returns The hyperbolic cosine integral value.
488
+ *
489
+ * @example
490
+ * ```ts
491
+ * Chi(Expression.create('x')).text() // "Chi(x)"
492
+ * ```
493
+ */
494
+ export declare function Chi(x: Expression): Expression;
495
+ /**
496
+ * Computes the exponential integral: `Ei(x) = −∫₋ₓ^∞ e^(−t)/t dt` (Cauchy principal value).
497
+ *
498
+ * - `Ei(+∞) = +∞`, `Ei(−∞) = 0`
499
+ * - `Ei(0) = −∞`
500
+ *
501
+ * @param x - The input expression.
502
+ * @returns The exponential integral value.
503
+ *
504
+ * @example
505
+ * ```ts
506
+ * Ei(Expression.create(0)).text() // "-Infinity"
507
+ * Ei(Expression.create('x')).text() // "Ei(x)"
508
+ * ```
509
+ */
510
+ export declare function Ei(x: Expression): Expression;
511
+ /**
512
+ * Computes the logarithmic integral: `Li(x) = ∫₀ˣ 1/ln(t) dt`.
513
+ *
514
+ * - `Li(+∞) = +∞`
515
+ * - `Li(1) = −∞` (the function has a logarithmic singularity at 1)
516
+ * - For negative numeric inputs, returns the symbolic form.
517
+ *
518
+ * @param x - The input expression.
519
+ * @returns The logarithmic integral value.
520
+ *
521
+ * @example
522
+ * ```ts
523
+ * Li(Expression.create('x')).text() // "Li(x)"
524
+ * ```
525
+ */
526
+ export declare function Li(x: Expression): Expression;
527
+ /**
528
+ * Computes the natural (base-e) logarithm, or optionally a logarithm with a specified base.
529
+ *
530
+ * When `Settings.EVALUATE` is `false`, real-domain logarithm identities are
531
+ * applied only when their arguments are provably positive real values. This
532
+ * keeps product, quotient, and power rewrites from crossing principal complex
533
+ * branches when a symbolic sign is unknown.
534
+ *
535
+ * For known negative real inputs, returns `log(|x|) + iπ`. Complex inputs use the
536
+ * principal branch: `log(z) = log|z| + i·arg(z)`.
537
+ *
538
+ * @param x - The expression to take the logarithm of.
539
+ * @param base - Optional logarithm base. Defaults to `e` (natural log).
540
+ * @param expandPrimes - When `true`, decomposes integer arguments into prime factors
541
+ * (e.g. `log(8)` becomes `3·log(2)`). Defaults to `false`.
542
+ * @returns The logarithm of `x`.
543
+ * @throws {@link core!UndefinedError} If `x` is `-∞`.
544
+ *
545
+ * @example
546
+ * ```ts
547
+ * log('e').text() // "1"
548
+ * log(1).text() // "0"
549
+ * log('e^x').text() // "x"
550
+ *
551
+ * // With base
552
+ * log(8, 2).text() // "3"
553
+ * ```
554
+ */
555
+ export declare function log(x: ExpressionInput, base?: ExpressionInput, expandPrimes?: boolean): Expression;
556
+ /**
557
+ * Returns the maximum value from a set of expressions.
558
+ *
559
+ * If all arguments can be compared numerically (or have assumed numeric values),
560
+ * returns the largest. Otherwise returns a symbolic `max(...)` node.
561
+ *
562
+ * @param args - Two or more expressions to compare.
563
+ * @returns The maximum value, or a symbolic `max(...)` node.
564
+ *
565
+ * @example
566
+ * ```ts
567
+ * max(1, 3, 2).text() // "3"
568
+ * max(-5, 0).text() // "0"
569
+ * max('x', 'y').text() // "max(x, y)"
570
+ * ```
571
+ */
572
+ export declare function max(...args: ExpressionInput[]): Expression;
573
+ /**
574
+ * Returns the minimum value from a set of expressions.
575
+ *
576
+ * If all arguments can be compared numerically (or have assumed numeric values),
577
+ * returns the smallest. Otherwise returns a symbolic `min(...)` node.
578
+ *
579
+ * @param args - Two or more expressions to compare.
580
+ * @returns The minimum value, or a symbolic `min(...)` node.
581
+ *
582
+ * @example
583
+ * ```ts
584
+ * min(1, 3, 2).text() // "1"
585
+ * min(-5, 0).text() // "-5"
586
+ * min('x', 'y').text() // "min(x, y)"
587
+ * ```
588
+ */
589
+ export declare function min(...args: ExpressionInput[]): Expression;
590
+ /**
591
+ * Computes the exponential function e^x.
592
+ *
593
+ * - `exp(0) = 1`
594
+ * - `exp(+∞) = +∞`, `exp(−∞) = 0`
595
+ * - For complex inputs `a + bi` where both parts are numeric, applies Euler's formula:
596
+ * `exp(a + bi) = exp(a) · (cos(b) + i·sin(b))`.
597
+ * - For symbolic inputs, returns `e^(x)`.
598
+ *
599
+ * @param x - The exponent expression.
600
+ * @returns The value of e raised to the power `x`.
601
+ *
602
+ * @example
603
+ * ```ts
604
+ * exp(0).text() // "1"
605
+ * exp(1).text() // "2.71828182845904..."
606
+ * exp('x').text() // "e^(x)"
607
+ * ```
608
+ */
609
+ export declare function exp(x: ExpressionInput): Expression;
610
+ /**
611
+ * Constructs a {@link Matrix} from the provided rows.
612
+ *
613
+ * Each argument is an array representing one row of the matrix. All rows must
614
+ * have the same length; elements are converted to {@link Expression} instances.
615
+ *
616
+ * @param args - One or more arrays, each representing one row of the matrix.
617
+ * @returns A new {@link Matrix} instance.
618
+ * @throws {@link core!MathError} If rows have inconsistent lengths.
619
+ *
620
+ * @example
621
+ * ```ts
622
+ * // 2×2 identity matrix
623
+ * matrix([1, 0], [0, 1]).text() // "matrix([1, 0], [0, 1])"
624
+ *
625
+ * // 2×3 matrix
626
+ * matrix([1, 2, 3], [4, 5, 6]).text()
627
+ * ```
628
+ */
629
+ export declare function matrix(...args: (NerdamerInput[] | Vector)[]): Matrix;
630
+ /**
631
+ * Computes a finite summation: `sum(expr, k, a, b) = Σ_{k=a}^{b} expr`.
632
+ *
633
+ * - If bounds are integers and the number of terms ≤ `Settings.MAX_PRODUCT_AND_SUMMATION_ITERATION`,
634
+ * evaluates by accumulating each term.
635
+ * - If `lower > upper`, returns `0` (empty range).
636
+ * - If `expr` does not depend on the index variable, simplifies to `expr · (b − a + 1)`.
637
+ * - Otherwise returns a symbolic `sum(expr, k, a, b)` node.
638
+ *
639
+ * @param expr - The expression to be summed.
640
+ * @param index - The index variable (must be a plain symbol).
641
+ * @param lower - The lower bound (integer required for evaluation).
642
+ * @param upper - The upper bound (integer required for evaluation).
643
+ * @returns The summation result or a symbolic `sum` node.
644
+ *
645
+ * @example
646
+ * ```ts
647
+ * // Σ_{k=1}^{5} k = 15
648
+ * sum('k', 'k', 1, 5).text() // "15"
649
+ * ```
650
+ */
651
+ export declare function sum(expr: Expression, index: Expression, lower: Expression, upper: Expression): Expression;
652
+ /**
653
+ * Computes a finite product: `product(expr, k, a, b) = Π_{k=a}^{b} expr`.
654
+ *
655
+ * - If bounds are integers and the number of terms ≤ `Settings.MAX_PRODUCT_AND_SUMMATION_ITERATION`,
656
+ * evaluates by multiplying each term.
657
+ * - If `lower > upper`, returns `1` (empty product).
658
+ * - If `expr` does not depend on the index variable, simplifies to `expr^(b − a + 1)`.
659
+ * - Otherwise returns a symbolic `product(expr, k, a, b)` node.
660
+ *
661
+ * @param expr - The expression to be multiplied.
662
+ * @param index - The index variable (must be a plain symbol).
663
+ * @param lower - The lower bound (integer required for evaluation).
664
+ * @param upper - The upper bound (integer required for evaluation).
665
+ * @returns The product result or a symbolic `product` node.
666
+ *
667
+ * @example
668
+ * ```ts
669
+ * // Π_{k=1}^{5} k = 120 (same as 5!)
670
+ * product('k', 'k', 1, 5).text() // "120"
671
+ * ```
672
+ */
673
+ export declare function product(expr: Expression, index: Expression, lower: Expression, upper: Expression): Expression;
674
+ /**
675
+ * Tests whether a value is present in a supported finite container.
676
+ *
677
+ * @remarks
678
+ * `Vector` membership uses the vector's element equality, while `ValuesSet` and
679
+ * `SolutionSet` delegate to their semantic set membership. `Dictionary` membership checks
680
+ * keys rather than stored values. Unsupported container types remain symbolic.
681
+ *
682
+ * @param x - Vector, finite set, solution set, or dictionary to search.
683
+ * @param value - Value to look up, or dictionary key when `x` is a Dictionary.
684
+ * @returns `1` when the value is found and `0` otherwise.
685
+ *
686
+ * @example
687
+ * ```ts
688
+ * const d = Parser.parse('{x=>1, y=>a}') as Dictionary;
689
+ * contains(d, 'x').text(); // 1
690
+ *
691
+ * const v = new Vector(['x', 1, 2]);
692
+ * contains(v, 10).text(); // 0
693
+ * ```
694
+ */
695
+ export declare function contains(x: Expression | Vector | ValuesSet | SolutionSet | Dictionary, value: ExpressionInput): Expression;