Last modified by Carina Enke on 10.01.2024

Hide last authors
Carina Enke 57.1 1 If an ONYX variable is used in MAXIMA calculations, it is always recommended to enclose it with parentheses (⋅).
Carina Enke 19.1 2
Carina Enke 57.1 3 Example: Variable {a} squared:
Carina Enke 19.1 4
Carina Enke 57.1 5 If {a}=-5 then {a}^2=-5^2=-25, whereas ({a})^2=(-5)^2=25.
6
7 The comparison of the two variants – with and without parentheses – can be seen in the example image below.
8
Carina Enke 59.1 9 [[image:attach:MAXIMA - Zusätzliche Klammer_de.png||data-xwiki-image-style="img-screen" data-xwiki-image-style-border="true" width="500"]]
Carina Enke 57.1 10
11 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.
12
13 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.