Version 58.1 von Carina Enke am 10.01.2024

Zeige letzte Bearbeiter
1 Wird eine ONYX-Variable in MAXIMA-Berechnungen verwendet, empfiehlt es sich, diese grundsätzlich mit Klammern (⋅) einzuschließen.
2
3 Beispiel: Quadrat der Variable {a}:
4
5 Bei {a}=-5 ergibt {a}^2=-5^2=-25, wohingegen ({a})^2=(-5)^2=25 ist.
6
7 Der Vergleich der zwei Varianten - ohne zusätzliche Klammer und mit zusätzlicher Klammer - ist im Beispielbild zu sehen.
8
9 [[image:attach:MAXIMA - Zusätzliche Klammer_de.png]]
10
11 ONYX bindet das CAS MAXIMA als externe Applikation an. MAXIMA Requests werden, in entsprechend vom Nutzer definierter Form, an MAXIMA gesendet, ohne interpretiert oder verändert zu werden. Wählt man als Variablen- und damit Ergebnis-Datentyp einen numerischen Datentyp, wird einzig der float-Ausdruck hinzugefügt.
12
13 Wenn beabsichtigt ist, dass {var1} einen beliebigen Wert des Nutzers annehmen kann, ist auch "3+4" oder ein beliebiger anderer Ausdruck denkbar. Wird nun {var1} in einem MAXIMA Request, wie z. B. {var1}^2, verwendet, wird dies entsprechend eines Platzhalters ohne weiteren Eingriff eingesetzt und an MAXIMA zur Berechnung übermittelt. Damit der beabsichtigte Gesamtkontex erhalten bleibt, sind deshalb zusätzliche Klammern um ONYX-Variablen notwendig.
14
15
16
17 If an ONYX variable is used in MAXIMA calculations, it is always recommended to enclose it with parentheses (⋅).
18
19 Example: Variable {a} squared:
20
21 If {a}=-5 then {a}^2=-5^2=-25, whereas ({a})^2=(-5)^2=25.
22
23 The comparison of the two variants – with and without parentheses – can be seen in the example image below.
24
25 [[image:attach:MAXIMA - Zusätzliche Klammer_de.png]]
26
27 ONYX connects the CAS MAXIMA as an external application. MAXIMA requests are sent to MAXIMA in a form defined by the user without being interpreted or modified. If you choose a numeric data type as the variable and thus as the result data type, only the float expression will be added.
28
29 If it is intended that {var1} can assume any value of the user, then "3+4" or any other expression is also conceivable. If {var1} is now used in a MAXIMA request, e. g. {var1}^2, this is inserted corresponding to a placeholder without further intervention and transmitted to MAXIMA for calculation. Therefore, to preserve the intended overall context, additional parentheses around ONYX variables are necessary.