math-exercises 2.2.9 → 2.2.11

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 (293) hide show
  1. package/lib/exercises/exercise.d.ts +2 -1
  2. package/lib/exercises/exercise.d.ts.map +1 -1
  3. package/lib/exercises/math/calcul/arithmetics/commonDivisorsList.d.ts.map +1 -1
  4. package/lib/exercises/math/calcul/arithmetics/commonDivisorsList.js +24 -7
  5. package/lib/exercises/math/calcul/decimals/index.d.ts +3 -0
  6. package/lib/exercises/math/calcul/decimals/index.d.ts.map +1 -0
  7. package/lib/exercises/math/calcul/decimals/index.js +18 -0
  8. package/lib/exercises/math/calcul/decimals/multiplyDecimalByNegativeTens.d.ts +8 -0
  9. package/lib/exercises/math/calcul/decimals/multiplyDecimalByNegativeTens.d.ts.map +1 -0
  10. package/lib/exercises/math/calcul/decimals/multiplyDecimalByNegativeTens.js +53 -0
  11. package/lib/exercises/math/calcul/decimals/multiplyDecimalByTens.d.ts +9 -0
  12. package/lib/exercises/math/calcul/decimals/multiplyDecimalByTens.d.ts.map +1 -0
  13. package/lib/exercises/math/calcul/decimals/multiplyDecimalByTens.js +63 -0
  14. package/lib/exercises/math/calcul/fractions/fractionsSumsSameDenominators.d.ts.map +1 -1
  15. package/lib/exercises/math/calcul/fractions/fractionsSumsSameDenominators.js +33 -1
  16. package/lib/exercises/math/calcul/index.d.ts +2 -0
  17. package/lib/exercises/math/calcul/index.d.ts.map +1 -1
  18. package/lib/exercises/math/calcul/index.js +2 -0
  19. package/lib/exercises/math/calcul/operations/expressionNature.d.ts +8 -0
  20. package/lib/exercises/math/calcul/operations/expressionNature.d.ts.map +1 -1
  21. package/lib/exercises/math/calcul/operations/expressionNature.js +180 -80
  22. package/lib/exercises/math/calcul/operations/index.d.ts +3 -0
  23. package/lib/exercises/math/calcul/operations/index.d.ts.map +1 -1
  24. package/lib/exercises/math/calcul/operations/index.js +3 -0
  25. package/lib/exercises/math/calcul/operations/operationsPriorities.d.ts +1 -1
  26. package/lib/exercises/math/calcul/operations/operationsPriorities.d.ts.map +1 -1
  27. package/lib/exercises/math/calcul/operations/operationsPriorities.js +20 -5
  28. package/lib/exercises/math/calcul/operations/operationsPrioritiesParenthesis.d.ts +8 -0
  29. package/lib/exercises/math/calcul/operations/operationsPrioritiesParenthesis.d.ts.map +1 -0
  30. package/lib/exercises/math/calcul/operations/operationsPrioritiesParenthesis.js +111 -0
  31. package/lib/exercises/math/calcul/operations/operationsPrioritiesParenthesisNoRelatives.d.ts +8 -0
  32. package/lib/exercises/math/calcul/operations/operationsPrioritiesParenthesisNoRelatives.d.ts.map +1 -0
  33. package/lib/exercises/math/calcul/operations/operationsPrioritiesParenthesisNoRelatives.js +127 -0
  34. package/lib/exercises/math/calcul/operations/operationsPrioritiesWithoutRelative.d.ts.map +1 -1
  35. package/lib/exercises/math/calcul/operations/operationsPrioritiesWithoutRelative.js +18 -1
  36. package/lib/exercises/math/calcul/ordering/decimalOrdering.d.ts +9 -0
  37. package/lib/exercises/math/calcul/ordering/decimalOrdering.d.ts.map +1 -0
  38. package/lib/exercises/math/calcul/ordering/decimalOrdering.js +77 -0
  39. package/lib/exercises/math/calcul/ordering/framing.d.ts +10 -0
  40. package/lib/exercises/math/calcul/ordering/framing.d.ts.map +1 -0
  41. package/lib/exercises/math/calcul/ordering/framing.js +143 -0
  42. package/lib/exercises/math/calcul/ordering/index.d.ts +4 -0
  43. package/lib/exercises/math/calcul/ordering/index.d.ts.map +1 -0
  44. package/lib/exercises/math/calcul/ordering/index.js +19 -0
  45. package/lib/exercises/math/calcul/ordering/integerOrdering.d.ts +8 -0
  46. package/lib/exercises/math/calcul/ordering/integerOrdering.d.ts.map +1 -0
  47. package/lib/exercises/math/calcul/ordering/integerOrdering.js +61 -0
  48. package/lib/exercises/math/calculLitteral/distributivity/doubleDistributivity.d.ts.map +1 -1
  49. package/lib/exercises/math/calculLitteral/distributivity/firstIdentity.d.ts.map +1 -1
  50. package/lib/exercises/math/calculLitteral/distributivity/secondIdentity.d.ts.map +1 -1
  51. package/lib/exercises/math/calculLitteral/distributivity/simpleDistributivity.d.ts.map +1 -1
  52. package/lib/exercises/math/calculLitteral/distributivity/thirdIdentity.d.ts.map +1 -1
  53. package/lib/exercises/math/calculLitteral/equation/equationType2Exercise.d.ts.map +1 -1
  54. package/lib/exercises/math/calculLitteral/equation/equationType4Exercise.d.ts.map +1 -1
  55. package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq1.d.ts.map +1 -1
  56. package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq2.d.ts.map +1 -1
  57. package/lib/exercises/math/derivation/derivative/convexityQuadrinomials.d.ts.map +1 -1
  58. package/lib/exercises/math/derivation/derivative/powerFunctionDerivative.js +1 -1
  59. package/lib/exercises/math/functions/affines/leadingCoeffAndOriginOrdinate.js +1 -1
  60. package/lib/exercises/math/functions/basics/graphicInequation.d.ts.map +1 -1
  61. package/lib/exercises/math/functions/basics/graphicInequation.js +9 -6
  62. package/lib/exercises/math/functions/basics/twoFunctionsInequation.d.ts.map +1 -1
  63. package/lib/exercises/math/functions/basics/twoFunctionsInequation.js +15 -4
  64. package/lib/exercises/math/functions/trinoms/canonicalFromDevForm.d.ts.map +1 -1
  65. package/lib/exercises/math/geometry/cartesian/directionVector.d.ts.map +1 -1
  66. package/lib/exercises/math/geometry/cartesian/directionVectorEquation.d.ts.map +1 -1
  67. package/lib/exercises/math/geometry/cartesian/placeAPoint.d.ts.map +1 -1
  68. package/lib/exercises/math/geometry/cartesian/placeAPoint.js +0 -4
  69. package/lib/exercises/math/geometry/vectors/equalCaracteristicFromGraph.d.ts.map +1 -1
  70. package/lib/exercises/math/geometry/vectors/equalCaracteristicFromGraph.js +2 -3
  71. package/lib/exercises/math/geometry/vectors/vectorCoordinatesFromTwoPoints.d.ts.map +1 -1
  72. package/lib/exercises/math/geometry/vectors/vectorCoordinatesFromTwoPoints.js +17 -0
  73. package/lib/exercises/math/geometry/volumes/volumeOfCube.d.ts.map +1 -1
  74. package/lib/exercises/math/geometry/volumes/volumeOfCube.js +7 -1
  75. package/lib/exercises/math/index.d.ts +0 -1
  76. package/lib/exercises/math/index.d.ts.map +1 -1
  77. package/lib/exercises/math/index.js +0 -1
  78. package/lib/exercises/math/limits/rationalFracForbiddenValueLimit.d.ts.map +1 -1
  79. package/lib/exercises/math/percent/htToTTC.d.ts +8 -0
  80. package/lib/exercises/math/percent/htToTTC.d.ts.map +1 -0
  81. package/lib/exercises/math/percent/htToTTC.js +50 -0
  82. package/lib/exercises/math/percent/index.d.ts +2 -0
  83. package/lib/exercises/math/percent/index.d.ts.map +1 -1
  84. package/lib/exercises/math/percent/index.js +2 -0
  85. package/lib/exercises/math/percent/ttcToHT.d.ts +8 -0
  86. package/lib/exercises/math/percent/ttcToHT.d.ts.map +1 -0
  87. package/lib/exercises/math/percent/ttcToHT.js +50 -0
  88. package/lib/exercises/math/powers/powersDivision.d.ts.map +1 -1
  89. package/lib/exercises/math/powers/powersDivision.js +35 -2
  90. package/lib/exercises/math/probaStat/calculateProbaOfBinomialDistribution.d.ts.map +1 -1
  91. package/lib/exercises/math/probaStat/calculateProbaOfBinomialDistribution.js +21 -0
  92. package/lib/exercises/math/probaStat/probaFromTableWithContext.js +1 -1
  93. package/lib/exercises/math/probaStat/stats1var/averageList.d.ts +7 -0
  94. package/lib/exercises/math/probaStat/stats1var/averageList.d.ts.map +1 -0
  95. package/lib/exercises/math/probaStat/stats1var/averageList.js +52 -0
  96. package/lib/exercises/math/probaStat/stats1var/etendueList.d.ts +7 -0
  97. package/lib/exercises/math/probaStat/stats1var/etendueList.d.ts.map +1 -0
  98. package/lib/exercises/math/probaStat/stats1var/etendueList.js +49 -0
  99. package/lib/exercises/math/probaStat/stats1var/index.d.ts +2 -0
  100. package/lib/exercises/math/probaStat/stats1var/index.d.ts.map +1 -1
  101. package/lib/exercises/math/probaStat/stats1var/index.js +2 -0
  102. package/lib/exercises/math/probaStat/stats1var/marginalAndConditionalFrequency.d.ts.map +1 -1
  103. package/lib/exercises/math/probaStat/stats1var/marginalAndConditionalFrequency.js +2 -11
  104. package/lib/exercises/math/sequences/arithmetic/arithmeticFindTerm.d.ts.map +1 -1
  105. package/lib/exercises/math/sequences/arithmetic/arithmeticFindTerm.js +42 -0
  106. package/lib/exercises/math/sequences/arithmetic/recognizeArithmeticFromFirstTerms.d.ts.map +1 -1
  107. package/lib/exercises/math/sequences/arithmetic/recognizeArithmeticFromFirstTerms.js +7 -2
  108. package/lib/exercises/math/sequences/geometric/geometricFindTerm.d.ts.map +1 -1
  109. package/lib/exercises/math/sequences/geometric/geometricFindTerm.js +42 -0
  110. package/lib/exercises/math/sequences/geometric/geometricFirstTermsGeneralSum.d.ts +10 -0
  111. package/lib/exercises/math/sequences/geometric/geometricFirstTermsGeneralSum.d.ts.map +1 -0
  112. package/lib/exercises/math/sequences/geometric/geometricFirstTermsGeneralSum.js +56 -0
  113. package/lib/exercises/math/sequences/geometric/index.d.ts +1 -0
  114. package/lib/exercises/math/sequences/geometric/index.d.ts.map +1 -1
  115. package/lib/exercises/math/sequences/geometric/index.js +1 -0
  116. package/lib/exercises/math/sequences/index.d.ts +2 -0
  117. package/lib/exercises/math/sequences/index.d.ts.map +1 -1
  118. package/lib/exercises/math/sequences/index.js +2 -0
  119. package/lib/exercises/math/sequences/sequenceEvaluation.d.ts +10 -0
  120. package/lib/exercises/math/sequences/sequenceEvaluation.d.ts.map +1 -0
  121. package/lib/exercises/math/sequences/sequenceEvaluation.js +143 -0
  122. package/lib/exercises/math/sequences/sequencePlot.d.ts +9 -0
  123. package/lib/exercises/math/sequences/sequencePlot.d.ts.map +1 -0
  124. package/lib/exercises/math/sequences/sequencePlot.js +94 -0
  125. package/lib/exercises/math/sets/intervals/intervalsIntersection.d.ts.map +1 -1
  126. package/lib/exercises/math/sets/intervals/intervalsIntersection.js +19 -1
  127. package/lib/exercises/math/sets/intervals/intervalsUnion.js +1 -1
  128. package/lib/exercises/math/trigonometry/arcValue.d.ts.map +1 -1
  129. package/lib/exercises/math/trigonometry/arcValue.js +23 -0
  130. package/lib/exercises/pc/chemicalReactions/stoichiometricReaction.js +1 -1
  131. package/lib/exercises/pc/electricity/ohmicConductorOrGenerator.js +1 -1
  132. package/lib/exercises/pc/motion/typeOfAcceleration.js +1 -1
  133. package/lib/exercises/pc/motion/typeOfMovement.js +1 -1
  134. package/lib/exercises/pc/recognizeRefractionOrReflectionAngles.js +1 -1
  135. package/lib/index.d.ts +54 -10
  136. package/lib/index.d.ts.map +1 -1
  137. package/lib/math/geometry/point.d.ts +11 -0
  138. package/lib/math/geometry/point.d.ts.map +1 -1
  139. package/lib/math/geometry/point.js +8 -0
  140. package/lib/math/numbers/decimals/decimal.d.ts +2 -0
  141. package/lib/math/numbers/decimals/decimal.d.ts.map +1 -1
  142. package/lib/math/numbers/decimals/decimal.js +18 -0
  143. package/lib/math/numbers/reals/extendedRingElement.d.ts +3 -1
  144. package/lib/math/numbers/reals/extendedRingElement.d.ts.map +1 -1
  145. package/lib/math/numbers/reals/real.d.ts +1 -1
  146. package/lib/math/polynomials/trinom.d.ts +1 -1
  147. package/lib/math/sets/intervals/intervals.d.ts +3 -1
  148. package/lib/math/sets/intervals/intervals.d.ts.map +1 -1
  149. package/lib/math/sets/intervals/intervals.js +9 -5
  150. package/lib/math/sets/mathSet.d.ts +2 -2
  151. package/lib/math/sets/mathSet.d.ts.map +1 -1
  152. package/lib/math/sets/mathSetInterface.d.ts +1 -1
  153. package/lib/playground.d.ts.map +1 -1
  154. package/lib/playground.js +13 -2
  155. package/lib/server.d.ts.map +1 -1
  156. package/lib/tree/nodes/algebraicNode.d.ts.map +1 -1
  157. package/lib/tree/nodes/algebraicNode.js +0 -3
  158. package/lib/tree/nodes/complex/complexNode.d.ts +10 -1
  159. package/lib/tree/nodes/complex/complexNode.d.ts.map +1 -1
  160. package/lib/tree/nodes/complex/complexNode.js +7 -0
  161. package/lib/tree/nodes/equations/equalNode.d.ts +10 -1
  162. package/lib/tree/nodes/equations/equalNode.d.ts.map +1 -1
  163. package/lib/tree/nodes/equations/equalNode.js +7 -0
  164. package/lib/tree/nodes/equations/equationSolutionNode.d.ts +10 -1
  165. package/lib/tree/nodes/equations/equationSolutionNode.d.ts.map +1 -1
  166. package/lib/tree/nodes/equations/equationSolutionNode.js +6 -0
  167. package/lib/tree/nodes/equations/multiEqualNode.d.ts +7 -1
  168. package/lib/tree/nodes/equations/multiEqualNode.d.ts.map +1 -1
  169. package/lib/tree/nodes/equations/multiEqualNode.js +6 -0
  170. package/lib/tree/nodes/functions/absNode.d.ts +7 -1
  171. package/lib/tree/nodes/functions/absNode.d.ts.map +1 -1
  172. package/lib/tree/nodes/functions/absNode.js +6 -0
  173. package/lib/tree/nodes/functions/arcSinNode.d.ts +7 -1
  174. package/lib/tree/nodes/functions/arcSinNode.d.ts.map +1 -1
  175. package/lib/tree/nodes/functions/arcSinNode.js +8 -1
  176. package/lib/tree/nodes/functions/arccosNode.d.ts +7 -1
  177. package/lib/tree/nodes/functions/arccosNode.d.ts.map +1 -1
  178. package/lib/tree/nodes/functions/arccosNode.js +8 -1
  179. package/lib/tree/nodes/functions/arctanNode.d.ts +7 -1
  180. package/lib/tree/nodes/functions/arctanNode.d.ts.map +1 -1
  181. package/lib/tree/nodes/functions/arctanNode.js +8 -1
  182. package/lib/tree/nodes/functions/cosNode.d.ts +7 -1
  183. package/lib/tree/nodes/functions/cosNode.d.ts.map +1 -1
  184. package/lib/tree/nodes/functions/cosNode.js +8 -1
  185. package/lib/tree/nodes/functions/expNode.d.ts +7 -1
  186. package/lib/tree/nodes/functions/expNode.d.ts.map +1 -1
  187. package/lib/tree/nodes/functions/expNode.js +6 -0
  188. package/lib/tree/nodes/functions/integralNode.d.ts +19 -2
  189. package/lib/tree/nodes/functions/integralNode.d.ts.map +1 -1
  190. package/lib/tree/nodes/functions/integralNode.js +20 -0
  191. package/lib/tree/nodes/functions/log10Node.d.ts +7 -1
  192. package/lib/tree/nodes/functions/log10Node.d.ts.map +1 -1
  193. package/lib/tree/nodes/functions/log10Node.js +6 -0
  194. package/lib/tree/nodes/functions/logNode.d.ts +7 -1
  195. package/lib/tree/nodes/functions/logNode.d.ts.map +1 -1
  196. package/lib/tree/nodes/functions/logNode.js +6 -0
  197. package/lib/tree/nodes/functions/oppositeNode.d.ts +7 -1
  198. package/lib/tree/nodes/functions/oppositeNode.d.ts.map +1 -1
  199. package/lib/tree/nodes/functions/oppositeNode.js +6 -0
  200. package/lib/tree/nodes/functions/sinNode.d.ts +7 -1
  201. package/lib/tree/nodes/functions/sinNode.d.ts.map +1 -1
  202. package/lib/tree/nodes/functions/sinNode.js +8 -1
  203. package/lib/tree/nodes/functions/sqrtNode.d.ts +7 -1
  204. package/lib/tree/nodes/functions/sqrtNode.d.ts.map +1 -1
  205. package/lib/tree/nodes/functions/sqrtNode.js +6 -0
  206. package/lib/tree/nodes/functions/tanNode.d.ts +7 -1
  207. package/lib/tree/nodes/functions/tanNode.d.ts.map +1 -1
  208. package/lib/tree/nodes/functions/tanNode.js +8 -1
  209. package/lib/tree/nodes/geometry/degree.d.ts +5 -1
  210. package/lib/tree/nodes/geometry/degree.d.ts.map +1 -1
  211. package/lib/tree/nodes/geometry/degree.js +6 -0
  212. package/lib/tree/nodes/geometry/lengthNode.d.ts +5 -1
  213. package/lib/tree/nodes/geometry/lengthNode.d.ts.map +1 -1
  214. package/lib/tree/nodes/geometry/lengthNode.js +6 -0
  215. package/lib/tree/nodes/geometry/pointNode.d.ts +14 -1
  216. package/lib/tree/nodes/geometry/pointNode.d.ts.map +1 -1
  217. package/lib/tree/nodes/geometry/pointNode.js +6 -0
  218. package/lib/tree/nodes/geometry/vectorNode.d.ts +5 -1
  219. package/lib/tree/nodes/geometry/vectorNode.d.ts.map +1 -1
  220. package/lib/tree/nodes/geometry/vectorNode.js +6 -0
  221. package/lib/tree/nodes/hasVariableNode.d.ts +3 -0
  222. package/lib/tree/nodes/hasVariableNode.d.ts.map +1 -0
  223. package/lib/tree/nodes/hasVariableNode.js +16 -0
  224. package/lib/tree/nodes/inequations/inequationNode.d.ts +8 -1
  225. package/lib/tree/nodes/inequations/inequationNode.d.ts.map +1 -1
  226. package/lib/tree/nodes/inequations/inequationNode.js +7 -0
  227. package/lib/tree/nodes/inequations/inequationSolutionNode.d.ts +19 -1
  228. package/lib/tree/nodes/inequations/inequationSolutionNode.d.ts.map +1 -1
  229. package/lib/tree/nodes/inequations/inequationSolutionNode.js +7 -1
  230. package/lib/tree/nodes/node.d.ts +52 -8
  231. package/lib/tree/nodes/node.d.ts.map +1 -1
  232. package/lib/tree/nodes/node.js +49 -21
  233. package/lib/tree/nodes/nodeConstructor.d.ts +7 -0
  234. package/lib/tree/nodes/nodeConstructor.d.ts.map +1 -0
  235. package/lib/tree/nodes/nodeConstructor.js +170 -0
  236. package/lib/tree/nodes/numbers/constantNode.d.ts +7 -1
  237. package/lib/tree/nodes/numbers/constantNode.d.ts.map +1 -1
  238. package/lib/tree/nodes/numbers/constantNode.js +9 -1
  239. package/lib/tree/nodes/numbers/numberNode.d.ts +5 -1
  240. package/lib/tree/nodes/numbers/numberNode.d.ts.map +1 -1
  241. package/lib/tree/nodes/numbers/numberNode.js +6 -0
  242. package/lib/tree/nodes/numbers/percentNode.d.ts +5 -1
  243. package/lib/tree/nodes/numbers/percentNode.d.ts.map +1 -1
  244. package/lib/tree/nodes/numbers/percentNode.js +6 -0
  245. package/lib/tree/nodes/operators/addNode.d.ts +10 -1
  246. package/lib/tree/nodes/operators/addNode.d.ts.map +1 -1
  247. package/lib/tree/nodes/operators/addNode.js +16 -6
  248. package/lib/tree/nodes/operators/divideNode.d.ts +11 -1
  249. package/lib/tree/nodes/operators/divideNode.d.ts.map +1 -1
  250. package/lib/tree/nodes/operators/divideNode.js +12 -0
  251. package/lib/tree/nodes/operators/fractionNode.d.ts +10 -1
  252. package/lib/tree/nodes/operators/fractionNode.d.ts.map +1 -1
  253. package/lib/tree/nodes/operators/fractionNode.js +7 -0
  254. package/lib/tree/nodes/operators/limitNode.d.ts +11 -1
  255. package/lib/tree/nodes/operators/limitNode.d.ts.map +1 -1
  256. package/lib/tree/nodes/operators/limitNode.js +8 -0
  257. package/lib/tree/nodes/operators/multiplyNode.d.ts +10 -1
  258. package/lib/tree/nodes/operators/multiplyNode.d.ts.map +1 -1
  259. package/lib/tree/nodes/operators/multiplyNode.js +7 -0
  260. package/lib/tree/nodes/operators/powerNode.d.ts +10 -1
  261. package/lib/tree/nodes/operators/powerNode.d.ts.map +1 -1
  262. package/lib/tree/nodes/operators/powerNode.js +7 -0
  263. package/lib/tree/nodes/operators/substractNode.d.ts +11 -1
  264. package/lib/tree/nodes/operators/substractNode.d.ts.map +1 -1
  265. package/lib/tree/nodes/operators/substractNode.js +12 -0
  266. package/lib/tree/nodes/sets/belongsNode.d.ts +10 -1
  267. package/lib/tree/nodes/sets/belongsNode.d.ts.map +1 -1
  268. package/lib/tree/nodes/sets/belongsNode.js +7 -0
  269. package/lib/tree/nodes/sets/closure.d.ts +2 -0
  270. package/lib/tree/nodes/sets/closure.d.ts.map +1 -1
  271. package/lib/tree/nodes/sets/closure.js +20 -0
  272. package/lib/tree/nodes/sets/discreteSetNode.d.ts +10 -2
  273. package/lib/tree/nodes/sets/discreteSetNode.d.ts.map +1 -1
  274. package/lib/tree/nodes/sets/discreteSetNode.js +13 -3
  275. package/lib/tree/nodes/sets/intervalNode.d.ts +14 -2
  276. package/lib/tree/nodes/sets/intervalNode.d.ts.map +1 -1
  277. package/lib/tree/nodes/sets/intervalNode.js +22 -1
  278. package/lib/tree/nodes/sets/setNode.d.ts +1 -0
  279. package/lib/tree/nodes/sets/setNode.d.ts.map +1 -1
  280. package/lib/tree/nodes/sets/unionIntervalNode.d.ts +7 -1
  281. package/lib/tree/nodes/sets/unionIntervalNode.d.ts.map +1 -1
  282. package/lib/tree/nodes/sets/unionIntervalNode.js +7 -1
  283. package/lib/tree/nodes/variables/variableNode.d.ts +5 -1
  284. package/lib/tree/nodes/variables/variableNode.d.ts.map +1 -1
  285. package/lib/tree/nodes/variables/variableNode.js +6 -0
  286. package/lib/tree/utilities/operatorComposition.js +4 -2
  287. package/lib/types/keyProps.d.ts +13 -0
  288. package/lib/types/keyProps.d.ts.map +1 -0
  289. package/lib/types/keyProps.js +2 -0
  290. package/lib/utils/alignTex.js +11 -9
  291. package/lib/utils/diceFlip.d.ts.map +1 -1
  292. package/lib/utils/diceFlip.js +2 -6
  293. package/package.json +1 -1
@@ -15,6 +15,12 @@ class AbsNode {
15
15
  this.type = node_1.NodeType.function;
16
16
  this.isNumeric = child.isNumeric;
17
17
  }
18
+ toIdentifiers() {
19
+ return {
20
+ id: node_1.NodeIds.abs,
21
+ child: this.child.toIdentifiers(),
22
+ };
23
+ }
18
24
  toMathString() {
19
25
  return `abs(${this.child.toMathString()})`;
20
26
  }
@@ -1,4 +1,4 @@
1
- import { Node, NodeType } from "../node";
1
+ import { Node, NodeIds, NodeType } from "../node";
2
2
  import { FunctionNode, FunctionsIds } from "./functionNode";
3
3
  import { AlgebraicNode } from "../algebraicNode";
4
4
  export declare function isArcsinNode(a: Node): a is ArcsinNode;
@@ -8,6 +8,12 @@ export declare class ArcsinNode implements FunctionNode {
8
8
  type: NodeType;
9
9
  isNumeric: boolean;
10
10
  constructor(child: AlgebraicNode);
11
+ toIdentifiers(): {
12
+ id: NodeIds;
13
+ child: {
14
+ id: NodeIds;
15
+ } & Record<string, any>;
16
+ };
11
17
  toMathString(): string;
12
18
  toTex(): string;
13
19
  toEquivalentNodes(): AlgebraicNode[];
@@ -1 +1 @@
1
- {"version":3,"file":"arcSinNode.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/functions/arcSinNode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAmB,MAAM,SAAS,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,YAAY,EAAkB,MAAM,gBAAgB,CAAC;AAC5E,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAGjD,wBAAgB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AM,CAAC,MAAM,EAAE,MAAM,CAAC;IAIrC,MAAM,CAAC,IAAI,EAAE,aAAa,GAAG,OAAO;CAGrC"}
@@ -4,6 +4,7 @@ exports.ArcsinNode = exports.isArcsinNode = void 0;
4
4
  const node_1 = require("../node");
5
5
  const functionNode_1 = require("./functionNode");
6
6
  const remarkableValues_1 = require("../../../math/trigonometry/remarkableValues");
7
+ const hasVariableNode_1 = require("../hasVariableNode");
7
8
  function isArcsinNode(a) {
8
9
  return (0, functionNode_1.isFunctionNode)(a) && a.id === functionNode_1.FunctionsIds.arcsin;
9
10
  }
@@ -15,6 +16,12 @@ class ArcsinNode {
15
16
  this.type = node_1.NodeType.function;
16
17
  this.isNumeric = child.isNumeric;
17
18
  }
19
+ toIdentifiers() {
20
+ return {
21
+ id: node_1.NodeIds.arcsin,
22
+ child: this.child.toIdentifiers(),
23
+ };
24
+ }
18
25
  toMathString() {
19
26
  return `arcsin(${this.child.toMathString()})`;
20
27
  }
@@ -34,7 +41,7 @@ class ArcsinNode {
34
41
  }
35
42
  simplify() {
36
43
  const simplifiedChild = this.child.simplify();
37
- if (!(0, node_1.hasVariableNode)(simplifiedChild)) {
44
+ if (!(0, hasVariableNode_1.hasVariableNode)(simplifiedChild)) {
38
45
  const value = simplifiedChild.evaluate({});
39
46
  const trigoPoint = remarkableValues_1.remarkableTrigoValues.find((remarkableValue) => remarkableValue.sin.evaluate({}) === value);
40
47
  if (!trigoPoint)
@@ -1,4 +1,4 @@
1
- import { Node, NodeType } from "../node";
1
+ import { Node, NodeIds, NodeType } from "../node";
2
2
  import { FunctionNode, FunctionsIds } from "./functionNode";
3
3
  import { AlgebraicNode } from "../algebraicNode";
4
4
  export declare function isArccosNode(a: Node): a is ArccosNode;
@@ -8,6 +8,12 @@ export declare class ArccosNode implements FunctionNode {
8
8
  type: NodeType;
9
9
  isNumeric: boolean;
10
10
  constructor(child: AlgebraicNode);
11
+ toIdentifiers(): {
12
+ id: NodeIds;
13
+ child: {
14
+ id: NodeIds;
15
+ } & Record<string, any>;
16
+ };
11
17
  toMathString(): string;
12
18
  toTex(): string;
13
19
  toEquivalentNodes(): AlgebraicNode[];
@@ -1 +1 @@
1
- {"version":3,"file":"arccosNode.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/functions/arccosNode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAmB,MAAM,SAAS,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,YAAY,EAAkB,MAAM,gBAAgB,CAAC;AAC5E,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAGjD,wBAAgB,YAAY,CAAC,CAAC,EAAE,IAAI,GAAG,CAAC,IAAI,UAAU,CAErD;AAED,qBAAa,UAAW,YAAW,YAAY;IAC7C,EAAE,EAAE,YAAY,CAAC;IACjB,KAAK,EAAE,aAAa,CAAC;IACrB,IAAI,EAAE,QAAQ,CAAC;IACf,SAAS,EAAE,OAAO,CAAC;gBAEP,KAAK,EAAE,aAAa;IAOhC,YAAY,IAAI,MAAM;IAItB,KAAK,IAAI,MAAM;IAIf,iBAAiB,IAAI,aAAa,EAAE;IASpC,cAAc,IAAI,MAAM,EAAE;IAI1B,QAAQ,IAAI,aAAa;IAkBzB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAIrC,MAAM,CAAC,IAAI,EAAE,aAAa,GAAG,OAAO;CAGrC"}
1
+ {"version":3,"file":"arccosNode.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/functions/arccosNode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,YAAY,EAAkB,MAAM,gBAAgB,CAAC;AAC5E,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAIjD,wBAAgB,YAAY,CAAC,CAAC,EAAE,IAAI,GAAG,CAAC,IAAI,UAAU,CAErD;AAED,qBAAa,UAAW,YAAW,YAAY;IAC7C,EAAE,EAAE,YAAY,CAAC;IACjB,KAAK,EAAE,aAAa,CAAC;IACrB,IAAI,EAAE,QAAQ,CAAC;IACf,SAAS,EAAE,OAAO,CAAC;gBAEP,KAAK,EAAE,aAAa;IAMhC,aAAa;;;;;;IAMb,YAAY,IAAI,MAAM;IAItB,KAAK,IAAI,MAAM;IAIf,iBAAiB,IAAI,aAAa,EAAE;IASpC,cAAc,IAAI,MAAM,EAAE;IAI1B,QAAQ,IAAI,aAAa;IAkBzB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAIrC,MAAM,CAAC,IAAI,EAAE,aAAa,GAAG,OAAO;CAGrC"}
@@ -4,6 +4,7 @@ exports.ArccosNode = exports.isArccosNode = void 0;
4
4
  const node_1 = require("../node");
5
5
  const functionNode_1 = require("./functionNode");
6
6
  const remarkableValues_1 = require("../../../math/trigonometry/remarkableValues");
7
+ const hasVariableNode_1 = require("../hasVariableNode");
7
8
  function isArccosNode(a) {
8
9
  return (0, functionNode_1.isFunctionNode)(a) && a.id === functionNode_1.FunctionsIds.arccos;
9
10
  }
@@ -15,6 +16,12 @@ class ArccosNode {
15
16
  this.type = node_1.NodeType.function;
16
17
  this.isNumeric = child.isNumeric;
17
18
  }
19
+ toIdentifiers() {
20
+ return {
21
+ id: node_1.NodeIds.arccos,
22
+ child: this.child.toIdentifiers(),
23
+ };
24
+ }
18
25
  toMathString() {
19
26
  return `arccos(${this.child.toMathString()})`;
20
27
  }
@@ -34,7 +41,7 @@ class ArccosNode {
34
41
  }
35
42
  simplify() {
36
43
  const simplifiedChild = this.child.simplify();
37
- if (!(0, node_1.hasVariableNode)(simplifiedChild)) {
44
+ if (!(0, hasVariableNode_1.hasVariableNode)(simplifiedChild)) {
38
45
  const value = simplifiedChild.evaluate({});
39
46
  const trigoPoint = remarkableValues_1.remarkableTrigoValues.find((remarkableValue) => remarkableValue.cos.evaluate({}) === value);
40
47
  if (!trigoPoint)
@@ -1,4 +1,4 @@
1
- import { Node, NodeType } from "../node";
1
+ import { Node, NodeIds, NodeType } from "../node";
2
2
  import { FunctionNode, FunctionsIds } from "./functionNode";
3
3
  import { AlgebraicNode } from "../algebraicNode";
4
4
  export declare function isArctanNode(a: Node): a is ArctanNode;
@@ -8,6 +8,12 @@ export declare class ArctanNode implements FunctionNode {
8
8
  type: NodeType;
9
9
  isNumeric: boolean;
10
10
  constructor(child: AlgebraicNode);
11
+ toIdentifiers(): {
12
+ id: NodeIds;
13
+ child: {
14
+ id: NodeIds;
15
+ } & Record<string, any>;
16
+ };
11
17
  toMathString(): string;
12
18
  toTex(): string;
13
19
  toEquivalentNodes(): AlgebraicNode[];
@@ -1 +1 @@
1
- {"version":3,"file":"arctanNode.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/functions/arctanNode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAmB,MAAM,SAAS,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,YAAY,EAAkB,MAAM,gBAAgB,CAAC;AAC5E,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAGjD,wBAAgB,YAAY,CAAC,CAAC,EAAE,IAAI,GAAG,CAAC,IAAI,UAAU,CAErD;AAED,qBAAa,UAAW,YAAW,YAAY;IAC7C,EAAE,EAAE,YAAY,CAAC;IACjB,KAAK,EAAE,aAAa,CAAC;IACrB,IAAI,EAAE,QAAQ,CAAC;IACf,SAAS,EAAE,OAAO,CAAC;gBAEP,KAAK,EAAE,aAAa;IAOhC,YAAY,IAAI,MAAM;IAItB,KAAK,IAAI,MAAM;IAIf,iBAAiB,IAAI,aAAa,EAAE;IASpC,cAAc,IAAI,MAAM,EAAE;IAI1B,QAAQ,IAAI,aAAa;IAkBzB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAIrC,MAAM,CAAC,IAAI,EAAE,aAAa,GAAG,OAAO;CAGrC"}
1
+ {"version":3,"file":"arctanNode.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/functions/arctanNode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,YAAY,EAAkB,MAAM,gBAAgB,CAAC;AAC5E,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAIjD,wBAAgB,YAAY,CAAC,CAAC,EAAE,IAAI,GAAG,CAAC,IAAI,UAAU,CAErD;AAED,qBAAa,UAAW,YAAW,YAAY;IAC7C,EAAE,EAAE,YAAY,CAAC;IACjB,KAAK,EAAE,aAAa,CAAC;IACrB,IAAI,EAAE,QAAQ,CAAC;IACf,SAAS,EAAE,OAAO,CAAC;gBAEP,KAAK,EAAE,aAAa;IAMhC,aAAa;;;;;;IAMb,YAAY,IAAI,MAAM;IAItB,KAAK,IAAI,MAAM;IAIf,iBAAiB,IAAI,aAAa,EAAE;IASpC,cAAc,IAAI,MAAM,EAAE;IAI1B,QAAQ,IAAI,aAAa;IAkBzB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAIrC,MAAM,CAAC,IAAI,EAAE,aAAa,GAAG,OAAO;CAGrC"}
@@ -4,6 +4,7 @@ exports.ArctanNode = exports.isArctanNode = void 0;
4
4
  const node_1 = require("../node");
5
5
  const functionNode_1 = require("./functionNode");
6
6
  const remarkableValues_1 = require("../../../math/trigonometry/remarkableValues");
7
+ const hasVariableNode_1 = require("../hasVariableNode");
7
8
  function isArctanNode(a) {
8
9
  return (0, functionNode_1.isFunctionNode)(a) && a.id === functionNode_1.FunctionsIds.arctan;
9
10
  }
@@ -15,6 +16,12 @@ class ArctanNode {
15
16
  this.type = node_1.NodeType.function;
16
17
  this.isNumeric = child.isNumeric;
17
18
  }
19
+ toIdentifiers() {
20
+ return {
21
+ id: node_1.NodeIds.arctan,
22
+ child: this.child.toIdentifiers(),
23
+ };
24
+ }
18
25
  toMathString() {
19
26
  return `arctan(${this.child.toMathString()})`;
20
27
  }
@@ -34,7 +41,7 @@ class ArctanNode {
34
41
  }
35
42
  simplify() {
36
43
  const simplifiedChild = this.child.simplify();
37
- if (!(0, node_1.hasVariableNode)(simplifiedChild)) {
44
+ if (!(0, hasVariableNode_1.hasVariableNode)(simplifiedChild)) {
38
45
  const value = simplifiedChild.evaluate({});
39
46
  const trigoPoint = remarkableValues_1.remarkableTrigoValues.find((remarkableValue) => remarkableValue.tan?.evaluate({}) === value);
40
47
  if (!trigoPoint)
@@ -1,4 +1,4 @@
1
- import { Node, NodeType } from "../node";
1
+ import { Node, NodeIds, NodeType } from "../node";
2
2
  import { FunctionNode, FunctionsIds } from "./functionNode";
3
3
  import { AlgebraicNode, SimplifyOptions } from "../algebraicNode";
4
4
  export declare function isCosNode(a: Node): a is CosNode;
@@ -8,6 +8,12 @@ export declare class CosNode implements FunctionNode {
8
8
  type: NodeType;
9
9
  isNumeric: boolean;
10
10
  constructor(child: AlgebraicNode);
11
+ toIdentifiers(): {
12
+ id: NodeIds;
13
+ child: {
14
+ id: NodeIds;
15
+ } & Record<string, any>;
16
+ };
11
17
  toMathString(): string;
12
18
  toTex(): string;
13
19
  toEquivalentNodes(): AlgebraicNode[];
@@ -1 +1 @@
1
- {"version":3,"file":"cosNode.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/functions/cosNode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAmB,MAAM,SAAS,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,YAAY,EAAkB,MAAM,gBAAgB,CAAC;AAC5E,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAGlE,wBAAgB,SAAS,CAAC,CAAC,EAAE,IAAI,GAAG,CAAC,IAAI,OAAO,CAE/C;AAED,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AAC,MAAM,EAAE,MAAM,CAAC;IAIrC,MAAM,CAAC,IAAI,EAAE,aAAa,GAAG,OAAO;CAGrC"}
@@ -4,6 +4,7 @@ exports.CosNode = exports.isCosNode = void 0;
4
4
  const node_1 = require("../node");
5
5
  const functionNode_1 = require("./functionNode");
6
6
  const remarkableValues_1 = require("../../../math/trigonometry/remarkableValues");
7
+ const hasVariableNode_1 = require("../hasVariableNode");
7
8
  function isCosNode(a) {
8
9
  return (0, functionNode_1.isFunctionNode)(a) && a.id === functionNode_1.FunctionsIds.cos;
9
10
  }
@@ -15,6 +16,12 @@ class CosNode {
15
16
  this.type = node_1.NodeType.function;
16
17
  this.isNumeric = child.isNumeric;
17
18
  }
19
+ toIdentifiers() {
20
+ return {
21
+ id: node_1.NodeIds.cos,
22
+ child: this.child.toIdentifiers(),
23
+ };
24
+ }
18
25
  toMathString() {
19
26
  return `cos(${this.child.toMathString()})`;
20
27
  }
@@ -34,7 +41,7 @@ class CosNode {
34
41
  }
35
42
  simplify(opts = {}) {
36
43
  const simplifiedChild = this.child.simplify();
37
- if (!(0, node_1.hasVariableNode)(simplifiedChild)) {
44
+ if (!(0, hasVariableNode_1.hasVariableNode)(simplifiedChild)) {
38
45
  let value = simplifiedChild.evaluate({});
39
46
  if (opts.isDegree) {
40
47
  value = (value * Math.PI) / 180;
@@ -1,4 +1,4 @@
1
- import { Node, NodeOptions, NodeType } from "../node";
1
+ import { Node, NodeIds, NodeOptions, NodeType } from "../node";
2
2
  import { FunctionNode, FunctionsIds } from "./functionNode";
3
3
  import { AlgebraicNode } from "../algebraicNode";
4
4
  export declare function isExpNode(a: Node): a is ExpNode;
@@ -9,6 +9,12 @@ export declare class ExpNode implements FunctionNode {
9
9
  type: NodeType;
10
10
  isNumeric: boolean;
11
11
  constructor(child: AlgebraicNode, opts?: NodeOptions);
12
+ toIdentifiers(): {
13
+ id: NodeIds;
14
+ child: {
15
+ id: NodeIds;
16
+ } & Record<string, any>;
17
+ };
12
18
  toMathString(): string;
13
19
  toTex(): string;
14
20
  toEquivalentNodes(): AlgebraicNode[];
@@ -1 +1 @@
1
- {"version":3,"file":"expNode.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/functions/expNode.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,YAAY,EAAkB,MAAM,gBAAgB,CAAC;AAC5E,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAGjD,wBAAgB,SAAS,CAAC,CAAC,EAAE,IAAI,GAAG,CAAC,IAAI,OAAO,CAE/C;AACD,qBAAa,OAAQ,YAAW,YAAY;IAC1C,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,EAAE,EAAE,YAAY,CAAC;IACjB,KAAK,EAAE,aAAa,CAAC;IACrB,IAAI,EAAE,QAAQ,CAAC;IACf,SAAS,EAAE,OAAO,CAAC;gBACP,KAAK,EAAE,aAAa,EAAE,IAAI,CAAC,EAAE,WAAW;IAQpD,YAAY,IAAI,MAAM;IAItB,KAAK,IAAI,MAAM;IAmBf,iBAAiB,IAAI,aAAa,EAAE;IAUpC,cAAc,IAAI,MAAM,EAAE;IAI1B,QAAQ,IAAI,aAAa;IAOzB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAGrC,MAAM,CAAC,IAAI,EAAE,aAAa;CAG3B"}
1
+ {"version":3,"file":"expNode.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/functions/expNode.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC/D,OAAO,EAAE,YAAY,EAAE,YAAY,EAAkB,MAAM,gBAAgB,CAAC;AAC5E,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAGjD,wBAAgB,SAAS,CAAC,CAAC,EAAE,IAAI,GAAG,CAAC,IAAI,OAAO,CAE/C;AACD,qBAAa,OAAQ,YAAW,YAAY;IAC1C,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,EAAE,EAAE,YAAY,CAAC;IACjB,KAAK,EAAE,aAAa,CAAC;IACrB,IAAI,EAAE,QAAQ,CAAC;IACf,SAAS,EAAE,OAAO,CAAC;gBACP,KAAK,EAAE,aAAa,EAAE,IAAI,CAAC,EAAE,WAAW;IAOpD,aAAa;;;;;;IAMb,YAAY,IAAI,MAAM;IAItB,KAAK,IAAI,MAAM;IAmBf,iBAAiB,IAAI,aAAa,EAAE;IAUpC,cAAc,IAAI,MAAM,EAAE;IAI1B,QAAQ,IAAI,aAAa;IAOzB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAGrC,MAAM,CAAC,IAAI,EAAE,aAAa,GAAG,OAAO;CAGrC"}
@@ -18,6 +18,12 @@ class ExpNode {
18
18
  this.opts = opts;
19
19
  this.isNumeric = child.isNumeric;
20
20
  }
21
+ toIdentifiers() {
22
+ return {
23
+ id: node_1.NodeIds.exp,
24
+ child: this.child.toIdentifiers(),
25
+ };
26
+ }
21
27
  toMathString() {
22
28
  return `e^(${this.child.toMathString()})`;
23
29
  }
@@ -1,12 +1,29 @@
1
1
  import { AlgebraicNode } from "../algebraicNode";
2
- import { ToTexOptions } from "../node";
2
+ import { Node, NodeIds, NodeType, ToTexOptions } from "../node";
3
3
  import { VariableNode } from "../variables/variableNode";
4
- export declare class IntegralNode {
4
+ export declare class IntegralNode implements Node {
5
5
  functionNode: AlgebraicNode;
6
6
  lowerBound: AlgebraicNode;
7
7
  upperBound: AlgebraicNode;
8
8
  variable: VariableNode;
9
+ type: NodeType;
9
10
  constructor(functionNode: AlgebraicNode, lowerBound: AlgebraicNode, upperBound: AlgebraicNode, variable: string);
11
+ toIdentifiers(): {
12
+ id: NodeIds;
13
+ functionNode: {
14
+ id: NodeIds;
15
+ } & Record<string, any>;
16
+ lowerBound: {
17
+ id: NodeIds;
18
+ } & Record<string, any>;
19
+ upperBound: {
20
+ id: NodeIds;
21
+ } & Record<string, any>;
22
+ variable: VariableNode;
23
+ };
10
24
  toTex(opts?: ToTexOptions): string;
25
+ toMathString(): string;
26
+ toEquivalentNodes(): this[];
27
+ toAllValidTexs(): string[];
11
28
  }
12
29
  //# sourceMappingURL=integralNode.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"integralNode.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/functions/integralNode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAGzD,qBAAa,YAAY;IACvB,YAAY,EAAE,aAAa,CAAC;IAC5B,UAAU,EAAE,aAAa,CAAC;IAC1B,UAAU,EAAE,aAAa,CAAC;IAC1B,QAAQ,EAAE,YAAY,CAAC;gBAGrB,YAAY,EAAE,aAAa,EAC3B,UAAU,EAAE,aAAa,EACzB,UAAU,EAAE,aAAa,EACzB,QAAQ,EAAE,MAAM;IAQlB,KAAK,CAAC,IAAI,CAAC,EAAE,YAAY,GAAG,MAAM;CAGnC"}
1
+ {"version":3,"file":"integralNode.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/functions/integralNode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,IAAI,EAAE,OAAO,EAAe,QAAQ,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC7E,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAGzD,qBAAa,YAAa,YAAW,IAAI;IACvC,YAAY,EAAE,aAAa,CAAC;IAC5B,UAAU,EAAE,aAAa,CAAC;IAC1B,UAAU,EAAE,aAAa,CAAC;IAC1B,QAAQ,EAAE,YAAY,CAAC;IACvB,IAAI,WAAqB;gBAEvB,YAAY,EAAE,aAAa,EAC3B,UAAU,EAAE,aAAa,EACzB,UAAU,EAAE,aAAa,EACzB,QAAQ,EAAE,MAAM;IAOlB,aAAa;;;;;;;;;;;;;IASb,KAAK,CAAC,IAAI,CAAC,EAAE,YAAY,GAAG,MAAM;IAGlC,YAAY;IAGZ,iBAAiB;IAGjB,cAAc;CAGf"}
@@ -1,16 +1,36 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.IntegralNode = void 0;
4
+ const node_1 = require("../node");
4
5
  const variableNode_1 = require("../variables/variableNode");
5
6
  class IntegralNode {
6
7
  constructor(functionNode, lowerBound, upperBound, variable) {
8
+ this.type = node_1.NodeType.function;
7
9
  (this.functionNode = functionNode),
8
10
  (this.lowerBound = lowerBound),
9
11
  (this.upperBound = upperBound),
10
12
  (this.variable = new variableNode_1.VariableNode(variable));
11
13
  }
14
+ toIdentifiers() {
15
+ return {
16
+ id: node_1.NodeIds.integral,
17
+ functionNode: this.functionNode.toIdentifiers(),
18
+ lowerBound: this.lowerBound.toIdentifiers(),
19
+ upperBound: this.upperBound.toIdentifiers(),
20
+ variable: this.variable,
21
+ };
22
+ }
12
23
  toTex(opts) {
13
24
  return `\\int_{${this.lowerBound.toTex()}}^{${this.upperBound.toTex()}} ${this.functionNode.toTex()} \\, \\mathrm{d}${this.variable.toTex()}`;
14
25
  }
26
+ toMathString() {
27
+ return `intergral(${this.functionNode.toMathString()}, ${this.lowerBound.toMathString()}, ${this.upperBound.toMathString()}, ${this.variable.toMathString()})`;
28
+ }
29
+ toEquivalentNodes() {
30
+ return [this];
31
+ }
32
+ toAllValidTexs() {
33
+ return [this.toTex()];
34
+ }
15
35
  }
16
36
  exports.IntegralNode = IntegralNode;
@@ -1,4 +1,4 @@
1
- import { Node, NodeOptions, NodeType } from "../node";
1
+ import { Node, NodeIds, NodeOptions, NodeType } from "../node";
2
2
  import { FunctionNode, FunctionsIds } from "./functionNode";
3
3
  import { AlgebraicNode } from "../algebraicNode";
4
4
  export declare function isLog10Node(a: Node): a is Log10Node;
@@ -9,6 +9,12 @@ export declare class Log10Node implements FunctionNode {
9
9
  opts?: NodeOptions;
10
10
  isNumeric: boolean;
11
11
  constructor(child: AlgebraicNode, opts?: NodeOptions);
12
+ toIdentifiers(): {
13
+ id: NodeIds;
14
+ child: {
15
+ id: NodeIds;
16
+ } & Record<string, any>;
17
+ };
12
18
  toMathString(): string;
13
19
  toTex(): string;
14
20
  toEquivalentNodes(): AlgebraicNode[];
@@ -1 +1 @@
1
- {"version":3,"file":"log10Node.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/functions/log10Node.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,YAAY,EAAkB,MAAM,gBAAgB,CAAC;AAE5E,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAQjD,wBAAgB,WAAW,CAAC,CAAC,EAAE,IAAI,GAAG,CAAC,IAAI,SAAS,CAEnD;AACD,qBAAa,SAAU,YAAW,YAAY;IAC5C,EAAE,EAAE,YAAY,CAAC;IACjB,KAAK,EAAE,aAAa,CAAC;IACrB,IAAI,EAAE,QAAQ,CAAC;IACf,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,SAAS,EAAE,OAAO,CAAC;gBACP,KAAK,EAAE,aAAa,EAAE,IAAI,CAAC,EAAE,WAAW;IAQpD,YAAY,IAAI,MAAM;IAItB,KAAK,IAAI,MAAM;IAaf,iBAAiB,IAAI,aAAa,EAAE;IASpC,cAAc,IAAI,MAAM,EAAE;IAG1B,QAAQ,IAAI,aAAa;IAgCzB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAGrC,MAAM,CAAC,IAAI,EAAE,aAAa,GAAG,OAAO;CAGrC"}
1
+ {"version":3,"file":"log10Node.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/functions/log10Node.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC/D,OAAO,EAAE,YAAY,EAAE,YAAY,EAAkB,MAAM,gBAAgB,CAAC;AAE5E,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAQjD,wBAAgB,WAAW,CAAC,CAAC,EAAE,IAAI,GAAG,CAAC,IAAI,SAAS,CAEnD;AACD,qBAAa,SAAU,YAAW,YAAY;IAC5C,EAAE,EAAE,YAAY,CAAC;IACjB,KAAK,EAAE,aAAa,CAAC;IACrB,IAAI,EAAE,QAAQ,CAAC;IACf,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,SAAS,EAAE,OAAO,CAAC;gBACP,KAAK,EAAE,aAAa,EAAE,IAAI,CAAC,EAAE,WAAW;IAOpD,aAAa;;;;;;IAMb,YAAY,IAAI,MAAM;IAItB,KAAK,IAAI,MAAM;IAaf,iBAAiB,IAAI,aAAa,EAAE;IASpC,cAAc,IAAI,MAAM,EAAE;IAG1B,QAAQ,IAAI,aAAa;IAgCzB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAGrC,MAAM,CAAC,IAAI,EAAE,aAAa,GAAG,OAAO;CAGrC"}
@@ -22,6 +22,12 @@ class Log10Node {
22
22
  this.opts = opts;
23
23
  this.isNumeric = child.isNumeric;
24
24
  }
25
+ toIdentifiers() {
26
+ return {
27
+ id: node_1.NodeIds.log10,
28
+ child: this.child.toIdentifiers(),
29
+ };
30
+ }
25
31
  toMathString() {
26
32
  return `log_{10}(${this.child.toMathString()})`;
27
33
  }
@@ -1,4 +1,4 @@
1
- import { Node, NodeOptions, NodeType } from "../node";
1
+ import { Node, NodeIds, NodeOptions, NodeType } from "../node";
2
2
  import { FunctionNode, FunctionsIds } from "./functionNode";
3
3
  import { AlgebraicNode } from "../algebraicNode";
4
4
  export declare function isLogNode(a: Node): a is LogNode;
@@ -9,6 +9,12 @@ export declare class LogNode implements FunctionNode {
9
9
  opts?: NodeOptions;
10
10
  isNumeric: boolean;
11
11
  constructor(child: AlgebraicNode, opts?: NodeOptions);
12
+ toIdentifiers(): {
13
+ id: NodeIds;
14
+ child: {
15
+ id: NodeIds;
16
+ } & Record<string, any>;
17
+ };
12
18
  toMathString(): string;
13
19
  toTex(): string;
14
20
  toEquivalentNodes(): AlgebraicNode[];
@@ -1 +1 @@
1
- {"version":3,"file":"logNode.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/functions/logNode.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,YAAY,EAAkB,MAAM,gBAAgB,CAAC;AAE5E,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAQjD,wBAAgB,SAAS,CAAC,CAAC,EAAE,IAAI,GAAG,CAAC,IAAI,OAAO,CAE/C;AACD,qBAAa,OAAQ,YAAW,YAAY;IAC1C,EAAE,EAAE,YAAY,CAAC;IACjB,KAAK,EAAE,aAAa,CAAC;IACrB,IAAI,EAAE,QAAQ,CAAC;IACf,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,SAAS,EAAE,OAAO,CAAC;gBACP,KAAK,EAAE,aAAa,EAAE,IAAI,CAAC,EAAE,WAAW;IAQpD,YAAY,IAAI,MAAM;IAItB,KAAK,IAAI,MAAM;IAaf,iBAAiB,IAAI,aAAa,EAAE;IASpC,cAAc,IAAI,MAAM,EAAE;IAG1B,QAAQ,IAAI,aAAa;IAmCzB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAGrC,MAAM,CAAC,IAAI,EAAE,aAAa,GAAG,OAAO;CAGrC"}
1
+ {"version":3,"file":"logNode.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/functions/logNode.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC/D,OAAO,EAAE,YAAY,EAAE,YAAY,EAAkB,MAAM,gBAAgB,CAAC;AAE5E,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAQjD,wBAAgB,SAAS,CAAC,CAAC,EAAE,IAAI,GAAG,CAAC,IAAI,OAAO,CAE/C;AACD,qBAAa,OAAQ,YAAW,YAAY;IAC1C,EAAE,EAAE,YAAY,CAAC;IACjB,KAAK,EAAE,aAAa,CAAC;IACrB,IAAI,EAAE,QAAQ,CAAC;IACf,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,SAAS,EAAE,OAAO,CAAC;gBACP,KAAK,EAAE,aAAa,EAAE,IAAI,CAAC,EAAE,WAAW;IAOpD,aAAa;;;;;;IAMb,YAAY,IAAI,MAAM;IAItB,KAAK,IAAI,MAAM;IAaf,iBAAiB,IAAI,aAAa,EAAE;IASpC,cAAc,IAAI,MAAM,EAAE;IAG1B,QAAQ,IAAI,aAAa;IAmCzB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAGrC,MAAM,CAAC,IAAI,EAAE,aAAa,GAAG,OAAO;CAGrC"}
@@ -23,6 +23,12 @@ class LogNode {
23
23
  this.opts = opts;
24
24
  this.isNumeric = child.isNumeric;
25
25
  }
26
+ toIdentifiers() {
27
+ return {
28
+ id: node_1.NodeIds.log,
29
+ child: this.child.toIdentifiers(),
30
+ };
31
+ }
26
32
  toMathString() {
27
33
  return `log(${this.child.toMathString()})`;
28
34
  }
@@ -1,4 +1,4 @@
1
- import { Node, NodeOptions, NodeType } from "../node";
1
+ import { Node, NodeIds, NodeOptions, NodeType } from "../node";
2
2
  import { FunctionNode, FunctionsIds } from "./functionNode";
3
3
  import { NumberNode } from "../numbers/numberNode";
4
4
  import { AlgebraicNode, SimplifyOptions } from "../algebraicNode";
@@ -10,6 +10,12 @@ export declare class OppositeNode implements FunctionNode {
10
10
  opts?: NodeOptions;
11
11
  isNumeric: boolean;
12
12
  constructor(child: AlgebraicNode, opts?: NodeOptions);
13
+ toIdentifiers(): {
14
+ id: NodeIds;
15
+ child: {
16
+ id: NodeIds;
17
+ } & Record<string, any>;
18
+ };
13
19
  toMathString(): string;
14
20
  toTex(): string;
15
21
  toEquivalentNodes(opts?: NodeOptions): AlgebraicNode[];
@@ -1 +1 @@
1
- {"version":3,"file":"oppositeNode.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/functions/oppositeNode.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAMtD,OAAO,EAAE,YAAY,EAAE,YAAY,EAAkB,MAAM,gBAAgB,CAAC;AAC5E,OAAO,EAAE,UAAU,EAAgB,MAAM,uBAAuB,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAMlE,wBAAgB,cAAc,CAAC,CAAC,EAAE,IAAI,GAAG,CAAC,IAAI,YAAY,CAEzD;AAGD,qBAAa,YAAa,YAAW,YAAY;IAC/C,EAAE,EAAE,YAAY,CAAC;IACjB,KAAK,EAAE,aAAa,CAAC;IACrB,IAAI,EAAE,QAAQ,CAAC;IACf,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,SAAS,EAAE,OAAO,CAAC;gBACP,KAAK,EAAE,aAAa,EAAE,IAAI,CAAC,EAAE,WAAW;IAOpD,YAAY,IAAI,MAAM;IAGtB,KAAK,IAAI,MAAM;IAef,iBAAiB,CAAC,IAAI,CAAC,EAAE,WAAW,GAAG,aAAa,EAAE;IAgCtD;;;;OAIG;IACH,cAAc,CAAC,IAAI,CAAC,EAAE,WAAW,GAAG,MAAM,EAAE;IAQ5C,QA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eNode {
21
21
  this.opts = opts;
22
22
  this.isNumeric = child.isNumeric;
23
23
  }
24
+ toIdentifiers() {
25
+ return {
26
+ id: node_1.NodeIds.opposite,
27
+ child: this.child.toIdentifiers(),
28
+ };
29
+ }
24
30
  toMathString() {
25
31
  return `-(${this.child.toMathString()})`;
26
32
  }
@@ -1,4 +1,4 @@
1
- import { Node, NodeType } from "../node";
1
+ import { Node, NodeIds, NodeType } from "../node";
2
2
  import { FunctionNode, FunctionsIds } from "./functionNode";
3
3
  import { AlgebraicNode, SimplifyOptions } from "../algebraicNode";
4
4
  export declare function isSinNode(a: Node): a is SinNode;
@@ -8,6 +8,12 @@ export declare class SinNode implements FunctionNode {
8
8
  type: NodeType;
9
9
  isNumeric: boolean;
10
10
  constructor(child: AlgebraicNode);
11
+ toIdentifiers(): {
12
+ id: NodeIds;
13
+ child: {
14
+ id: NodeIds;
15
+ } & Record<string, any>;
16
+ };
11
17
  toMathString(): string;
12
18
  toTex(): string;
13
19
  toEquivalentNodes(): AlgebraicNode[];
@@ -1 +1 @@
1
- {"version":3,"file":"sinNode.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/functions/sinNode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAmB,MAAM,SAAS,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,YAAY,EAAkB,MAAM,gBAAgB,CAAC;AAC5E,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAGlE,wBAAgB,SAAS,CAAC,CAAC,EAAE,IAAI,GAAG,CAAC,IAAI,OAAO,CAE/C;AAED,qBAAa,OAAQ,YAAW,YAAY;IAC1C,EAAE,EAAE,YAAY,CAAC;IACjB,KAAK,EAAE,aAAa,CAAC;IACrB,IAAI,EAAE,QAAQ,CAAC;IACf,SAAS,EAAE,OAAO,CAAC;gBAEP,KAAK,EAAE,aAAa;IAOhC,YAAY,IAAI,MAAM;IAItB,KAAK,IAAI,MAAM;IAIf,iBAAiB,IAAI,aAAa,EAAE;IASpC,cAAc,IAAI,MAAM,EAAE;IAI1B,QAAQ,CAAC,IAAI,GAAE,eAAoB,GAAG,aAAa;IAsBnD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAIrC,MAAM,CAAC,IAAI,EAAE,aAAa,GAAG,OAAO;CAGrC"}
1
+ {"version":3,"file":"sinNode.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/functions/sinNode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,YAAY,EAAkB,MAAM,gBAAgB,CAAC;AAC5E,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAIlE,wBAAgB,SAAS,CAAC,CAAC,EAAE,IAAI,GAAG,CAAC,IAAI,OAAO,CAE/C;AAED,qBAAa,OAAQ,YAAW,YAAY;IAC1C,EAAE,EAAE,YAAY,CAAC;IACjB,KAAK,EAAE,aAAa,CAAC;IACrB,IAAI,EAAE,QAAQ,CAAC;IACf,SAAS,EAAE,OAAO,CAAC;gBAEP,KAAK,EAAE,aAAa;IAMhC,aAAa;;;;;;IAMb,YAAY,IAAI,MAAM;IAItB,KAAK,IAAI,MAAM;IAIf,iBAAiB,IAAI,aAAa,EAAE;IASpC,cAAc,IAAI,MAAM,EAAE;IAI1B,QAAQ,CAAC,IAAI,GAAE,eAAoB,GAAG,aAAa;IAsBnD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAIrC,MAAM,CAAC,IAAI,EAAE,aAAa,GAAG,OAAO;CAGrC"}
@@ -4,6 +4,7 @@ exports.SinNode = exports.isSinNode = void 0;
4
4
  const node_1 = require("../node");
5
5
  const functionNode_1 = require("./functionNode");
6
6
  const remarkableValues_1 = require("../../../math/trigonometry/remarkableValues");
7
+ const hasVariableNode_1 = require("../hasVariableNode");
7
8
  function isSinNode(a) {
8
9
  return (0, functionNode_1.isFunctionNode)(a) && a.id === functionNode_1.FunctionsIds.sin;
9
10
  }
@@ -15,6 +16,12 @@ class SinNode {
15
16
  this.type = node_1.NodeType.function;
16
17
  this.isNumeric = child.isNumeric;
17
18
  }
19
+ toIdentifiers() {
20
+ return {
21
+ id: node_1.NodeIds.sin,
22
+ child: this.child.toIdentifiers(),
23
+ };
24
+ }
18
25
  toMathString() {
19
26
  return `sin(${this.child.toMathString()})`;
20
27
  }
@@ -34,7 +41,7 @@ class SinNode {
34
41
  }
35
42
  simplify(opts = {}) {
36
43
  const simplifiedChild = this.child.simplify();
37
- if (!(0, node_1.hasVariableNode)(simplifiedChild)) {
44
+ if (!(0, hasVariableNode_1.hasVariableNode)(simplifiedChild)) {
38
45
  let value = simplifiedChild.evaluate({});
39
46
  if (opts.isDegree) {
40
47
  value = (value * Math.PI) / 180;
@@ -1,4 +1,4 @@
1
- import { Node, NodeOptions, NodeType } from "../node";
1
+ import { Node, NodeIds, NodeOptions, NodeType } from "../node";
2
2
  import { FunctionNode, FunctionsIds } from "./functionNode";
3
3
  import { AlgebraicNode, SimplifyOptions } from "../algebraicNode";
4
4
  export declare function isSqrtNode(a: Node): a is SqrtNode;
@@ -9,6 +9,12 @@ export declare class SqrtNode implements FunctionNode {
9
9
  opts?: NodeOptions;
10
10
  isNumeric: boolean;
11
11
  constructor(child: AlgebraicNode, opts?: NodeOptions);
12
+ toIdentifiers(): {
13
+ id: NodeIds;
14
+ child: {
15
+ id: NodeIds;
16
+ } & Record<string, any>;
17
+ };
12
18
  toMathString(): string;
13
19
  toTex(): string;
14
20
  toEquivalentNodes(opts?: NodeOptions): AlgebraicNode[];
@@ -1 +1 @@
1
- {"version":3,"file":"sqrtNode.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/functions/sqrtNode.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,WAAW,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,YAAW,YAAY;IAC3C,EAAE,EAAE,YAAY,CAAC;IACjB,KAAK,EAAE,aAAa,CAAC;IACrB,IAAI,EAAE,QAAQ,CAAC;IACf,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,SAAS,EAAE,OAAO,CAAC;gBACP,KAAK,EAAE,aAAa,EAAE,IAAI,CAAC,EAAE,WAAW;IAOpD,aAAa;;;;;;IAMb,YAAY,IAAI,MAAM;IAMtB,KAAK,IAAI,MAAM;IAIf,iBAAiB,CAAC,IAAI,CAAC,EAAE,WAAW,GAAG,aAAa,EAAE;IAwBtD,cAAc,CAAC,IAAI,CAAC,EAAE,WAAW,GAAG,MAAM,EAAE;IAG5C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAGrC,QAAQ,CAAC,IAAI,CAAC,EAAE,eAAe;IAmC/B,MAAM,CAAC,IAAI,EAAE,aAAa,GAAG,OAAO;CAGrC"}
@@ -21,6 +21,12 @@ class SqrtNode {
21
21
  this.opts = opts;
22
22
  this.isNumeric = child.isNumeric;
23
23
  }
24
+ toIdentifiers() {
25
+ return {
26
+ id: node_1.NodeIds.sqrt,
27
+ child: this.child.toIdentifiers(),
28
+ };
29
+ }
24
30
  toMathString() {
25
31
  return `sqr(${this.child.toMathString()})`;
26
32
  }
@@ -1,4 +1,4 @@
1
- import { Node, NodeType } from "../node";
1
+ import { Node, NodeIds, NodeType } from "../node";
2
2
  import { FunctionNode, FunctionsIds } from "./functionNode";
3
3
  import { AlgebraicNode, SimplifyOptions } from "../algebraicNode";
4
4
  export declare function isTanNode(a: Node): a is TanNode;
@@ -8,6 +8,12 @@ export declare class TanNode implements FunctionNode {
8
8
  type: NodeType;
9
9
  isNumeric: boolean;
10
10
  constructor(child: AlgebraicNode);
11
+ toIdentifiers(): {
12
+ id: NodeIds;
13
+ child: {
14
+ id: NodeIds;
15
+ } & Record<string, any>;
16
+ };
11
17
  toMathString(): string;
12
18
  toTex(): string;
13
19
  toEquivalentNodes(): AlgebraicNode[];
@@ -1 +1 @@
1
- {"version":3,"file":"tanNode.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/functions/tanNode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAmB,MAAM,SAAS,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,YAAY,EAAkB,MAAM,gBAAgB,CAAC;AAC5E,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAGlE,wBAAgB,SAAS,CAAC,CAAC,EAAE,IAAI,GAAG,CAAC,IAAI,OAAO,CAE/C;AAED,qBAAa,OAAQ,YAAW,YAAY;IAC1C,EAAE,EAAE,YAAY,CAAC;IACjB,KAAK,EAAE,aAAa,CAAC;IACrB,IAAI,EAAE,QAAQ,CAAC;IACf,SAAS,EAAE,OAAO,CAAC;gBAEP,KAAK,EAAE,aAAa;IAOhC,YAAY,IAAI,MAAM;IAItB,KAAK,IAAI,MAAM;IAIf,iBAAiB,IAAI,aAAa,EAAE;IASpC,cAAc,IAAI,MAAM,EAAE;IAI1B,QAAQ,CAAC,IAAI,GAAE,eAAoB,GAAG,aAAa;IAsBnD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAIrC,MAAM,CAAC,IAAI,EAAE,aAAa,GAAG,OAAO;CAGrC"}
1
+ {"version":3,"file":"tanNode.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/functions/tanNode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,YAAY,EAAkB,MAAM,gBAAgB,CAAC;AAC5E,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAIlE,wBAAgB,SAAS,CAAC,CAAC,EAAE,IAAI,GAAG,CAAC,IAAI,OAAO,CAE/C;AAED,qBAAa,OAAQ,YAAW,YAAY;IAC1C,EAAE,EAAE,YAAY,CAAC;IACjB,KAAK,EAAE,aAAa,CAAC;IACrB,IAAI,EAAE,QAAQ,CAAC;IACf,SAAS,EAAE,OAAO,CAAC;gBAEP,KAAK,EAAE,aAAa;IAMhC,aAAa;;;;;;IAMb,YAAY,IAAI,MAAM;IAItB,KAAK,IAAI,MAAM;IAIf,iBAAiB,IAAI,aAAa,EAAE;IASpC,cAAc,IAAI,MAAM,EAAE;IAI1B,QAAQ,CAAC,IAAI,GAAE,eAAoB,GAAG,aAAa;IAsBnD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAIrC,MAAM,CAAC,IAAI,EAAE,aAAa,GAAG,OAAO;CAGrC"}
@@ -4,6 +4,7 @@ exports.TanNode = exports.isTanNode = void 0;
4
4
  const node_1 = require("../node");
5
5
  const functionNode_1 = require("./functionNode");
6
6
  const remarkableValues_1 = require("../../../math/trigonometry/remarkableValues");
7
+ const hasVariableNode_1 = require("../hasVariableNode");
7
8
  function isTanNode(a) {
8
9
  return (0, functionNode_1.isFunctionNode)(a) && a.id === functionNode_1.FunctionsIds.tan;
9
10
  }
@@ -15,6 +16,12 @@ class TanNode {
15
16
  this.type = node_1.NodeType.function;
16
17
  this.isNumeric = child.isNumeric;
17
18
  }
19
+ toIdentifiers() {
20
+ return {
21
+ id: node_1.NodeIds.tan,
22
+ child: this.child.toIdentifiers(),
23
+ };
24
+ }
18
25
  toMathString() {
19
26
  return `tan(${this.child.toMathString()})`;
20
27
  }
@@ -34,7 +41,7 @@ class TanNode {
34
41
  }
35
42
  simplify(opts = {}) {
36
43
  const simplifiedChild = this.child.simplify();
37
- if (!(0, node_1.hasVariableNode)(simplifiedChild)) {
44
+ if (!(0, hasVariableNode_1.hasVariableNode)(simplifiedChild)) {
38
45
  let value = simplifiedChild.evaluate({});
39
46
  if (opts.isDegree) {
40
47
  value = (value * Math.PI) / 180;