From bbce87e26a262a2f442b86608bae06bfd42f3b0e Mon Sep 17 00:00:00 2001 From: Marshall Lochbaum Date: Fri, 16 Oct 2020 13:01:19 -0400 Subject: First expression diagram --- docs/tutorial/expression.html | 45 ++++++++++++++++++++++++++++++++++++++----- 1 file changed, 40 insertions(+), 5 deletions(-) (limited to 'docs/tutorial') diff --git a/docs/tutorial/expression.html b/docs/tutorial/expression.html index 5dfa2251..1f14e90b 100644 --- a/docs/tutorial/expression.html +++ b/docs/tutorial/expression.html @@ -60,11 +60,46 @@ 33.5103216382911

The evaluation order is shown below, with the function on the first line evaluated first, then × on the next, and so on. The effect of the parentheses is that ÷ is evaluated before the leftmost ×.

-
 =              23
-            π ×
-     4÷3
-    (   ) ×
-
+ + + + (4÷3) × π × 23 + + + + + + + + + + + + 4 + ÷ + 3 + × + π + × + 2 + + 3 + + + 4 + ÷ + 3 + × + π + × + 2 + + 3 + + + + +

The following rule might help you to internalize this system in addition to identifying when parentheses are needed: an expression never needs to end with a parenthesis, or contain two closing parentheses in a row. If it does, at least one set of parentheses can be removed.

One or two arguments?

What about functions without a left argument? Let's find an equation with lots of square roots in it… looks good.

-- cgit v1.2.3