GeoGebra Removes Parentheses Necessary for Evaluation
I am working on a demonstration of gear shapes and have run into an issue when using an IF statement in a parametric equation. I am using the XOR operator to link two expressions that output Boolean values:
If(IsInteger(k / 4) ⊕ (h(θ, d) ≤ 0), <Then>, <Else> )("Then" and "Else" statements removed for brevity)
Where the first expression checks if the number of teeth on the gear (half of the slider-value "k") is even, and the second expression checks if the output of the function "h(x,y)" is less than zero when given the inputs "θ" (from the parametric equation) and "d" (the rotational distance).
This evaluates as expected, with one caveat: when GeoGebra processes this input, it removes the parentheses around the second expression. If anything happens after this point to cause GeoGebra to re-evaluate the parametric equation - including the act of opening the file - it throws an error at the IF statement and replaces the entire parametric equation's definition with "?".
This is what the IF statement is changed to:
If(IsInteger(k / 4) ⊕ h(θ, d) ≤ 0, <Then>, <Else> )This is the error I get:
Illegal Boolean operation null = false ∨ 0Is there a way to force GeoGebra to leave the parentheses in, or a better way to set this up?