Repository navigation
The Laplacian, the Jacobian and the Hessian - #2190
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2190 +/- ##
=======================================
Coverage 86.53% 86.54%
=======================================
Files 297 297
Lines 66324 66349 +25
Branches 19267 19273 +6
=======================================
+ Hits 57396 57420 +24
- Misses 4857 4859 +2
+ Partials 4071 4070 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
This was referenced Oct 28, 2026
Rafael-SOWNet
added a commit
that referenced
this pull request
Oct 28, 2026
Complex.Conjugate was kept on the instance, made by Complex.Create under whatever downcasting setting its first caller had. A division by a complex number conjugates the divisor, so a division by i with the downcasting off left 0 - 1i, in decimals, as the conjugate of Complex.ImaginaryOne, the one instance every i is. conj(i) was that for every caller after it, in every thread. Two tests on #2190's branch failed in the full suite and passed alone: conj(i) against -i, and MathS.Conjugate's documented example. Which ran first decided it. The conjugate is now made each time it is asked for, under the setting in force, as every other number is: the division that asks for it reads the modulus the same way (#1615). A regression test divides by i with the downcasting off first; it fails without the change, with 0 - 1i. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
Rafael-SOWNet
added a commit
that referenced
this pull request
Oct 28, 2026
Complex.Conjugate was kept on the instance, made by Complex.Create under whatever downcasting setting its first caller had. A division by a complex number conjugates the divisor, so a division by i with the downcasting off left 0 - 1i, in decimals, as the conjugate of Complex.ImaginaryOne, the one instance every i is. conj(i) was that for every caller after it, in every thread. Two tests on #2190's branch failed in the full suite and passed alone: conj(i) against -i, and MathS.Conjugate's documented example. Which ran first decided it. The conjugate is now made each time it is asked for, under the setting in force, as every other number is: the division that asks for it reads the modulus the same way (#1615). A regression test divides by i with the downcasting off first; it fails without the change, with 0 - 1i. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
laplacian, jacobian and hessian were reserved by name in #2184 and are now computed when they are parsed, as det is. Each is made of derivative nodes and needs no node of its own. laplacian(f, [x, y, z]) is the sum of the second derivatives of a scalar f. jacobian(F, [x, y]) is the matrix of the first derivatives of F's components, with a row for each component and a column for each variable; a scalar F is one row. hessian(f, [x, y]) is the matrix of the second derivatives of a scalar f, the entry in row i and column j being the derivative in x_i of the derivative in x_j, as the definition writes it. The variables are a vector of distinct names written out, or a single name. A set is refused, having no order to give the columns, and so are a constant, a repeated name, and a vector or matrix as the function of a Laplacian or a Hessian. det(jacobian([r cos(t), r sin(t)], [r, t])) simplifies to r, and the Laplacian of 1/r vanishes in space. The syntax page and the MCP server's syntax document describe them, and the native smoke test evaluates two of them. Part of #2182. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
Rafael-SOWNet
force-pushed
the
the-laplacian-jacobian-and-hessian
branch
from
October 28, 2026 23:12
3049a37 to
b8b520e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
laplacian,jacobianandhessianwere reserved in #2184. They are now computed when parsed, asdetis, intoderivativenodes, so they need no node of their own. Part of #2182.laplacian(f, [x, y, z])fjacobian(F, [x, y])F, a column for each variable; a scalarFis one rowhessian(f, [x, y])(i, j)is the derivative inx_iof the derivative inx_jThe variables are a vector of distinct names, or one name. A set is refused, since it has no order to give the columns. So are a constant, a repeated name, and a vector given to
laplacianorhessian.det(jacobian([r cos(t), r sin(t)], [r, t]))simplifies tor."laplacian(x^2 y + y^3, [x, y])".ToEntity().Simplify()UnhandledParseException8 * y"jacobian([x y, x + y], [x, y])".ToEntity().Simplify()UnhandledParseException[[y, x], [1, 1]]"hessian(x^3 y^2, [x, y])".ToEntity().Simplify()UnhandledParseException[[6 * x * y ^ 2, 6 * x ^ 2 * y], [6 * x ^ 2 * y, 2 * x ^ 3]]🤖 Generated with Claude Code
https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura