Dear McNeel Forum Members,
I hope this message finds you well. This is my first appearance on the forum, and I extend my greetings to all fellow members.
I am reaching out to share an observation regarding the Evaluate Component in Rhino Grasshopper, which has posed quite a challenge for me. I’ve encountered what appears to be an inconsistency in the output of expressions, particularly when involving negative signs and exponents.
In a series of evaluations using the variables x and y, with x=3 and y=5, I entered the following expressions:
-x^2*y - x^2*y
with an outcome of 0-(x^2)*y - x^2*y
with an outcome of -90-(x^2)*y - (x^2)*y
with an outcome of -90-x^2*y - (x^2)*y
with an outcome of 0
According to the PEMDAS (Parentheses, Exponents, Multiplication and Division, Addition and Subtraction) order of operations, the outcome should consistently be -90 in all cases. However, it appears that only when the first term begins with a “-” sign and without parentheses, the evaluation yields the unexpected result.
I have attached a screenshot of the components in Grasshopper along with the Grasshopper file itself for reference.
My inquiry to the forum and to McNeel is whether this behavior is a known issue or if there might be an explanation for it within the logic of the Evaluate Component in Grasshopper.
Your insights and feedback on this matter would be greatly appreciated.
Best regards,
Ed_2001
Attached: Screenshot of Grasshopper Components, Grasshopper File:
Evaluate Component Inconsistency in Rhino Grasshopper.gh (12.1 KB)