Giac: fix calculus command argument slots - #25
Open
GliAcopo wants to merge 1 commit into
Open
Conversation
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.
Problem
Applying Giac → Calculus → Differentiate to selected structured mathematics immediately evaluated
diff(expression)and gave no place to specify a differentiation variable. This is particularly unhelpful for multivariable expressions. Several neighboring calculus actions similarly constructed calls with fewer argument slots than their documented Giac forms.Reproduction
ln(sqrt(x^2 + z^2) + z)as TeXmacs mathematics.Previously, the menu used arity 1, so TeXmacs took the immediate-evaluation path for
diff(selection). The expected interaction is an editablediff(selection, …)operation wherezcan be entered.Root cause
giac-applydelegates non-session operations to TeXmacs' genericscript-apply. Its arity controls both the generated argument slots and whether a selected unary operation is evaluated immediately. The Giac Calculus menu supplied unary or otherwise incomplete arities for several commands.Implementation
Use the practical documented arity for each Calculus action:
Optional higher-order, bounded, directional, or constrained forms remain editable by users without expanding this into a command redesign.
Examples
The differentiation action now supports
diff(x^2,x),diff(x*y,x),diff(x*y,y), anddiff(ln(sqrt(x^2+z^2)+z),z).Validation
1/sqrt(x^2+z^2).