You are browsing as a guest. Sign up (or log in) to start making projects!

59m 52s logged

Input evaluation

You can now evaluate inputs, e.g. (3+2)*6 outputs 30. This works by
recursively evaluating the AST nodes — operator precedence comes for free
from the tree structure.

All variables found in the input are collected, and the user is prompted
to assign a value to each one. This somewhat defeats the purpose of
variables for now, but it’s a stepping stone — variables become essential
once symbolic differentiation or a proper UI come into play.

0
2

Comments 0

No comments yet. Be the first!