Jump to content

Arithmetic evaluation: Difference between revisions

m
fix typo
(J: expand on opening comment)
m (fix typo)
Line 1,055:
Note that once you get beyond a few basic arithmetic operations, what we commonly call "mathematical precedence" stops making sense, and its primary value is that it allows polynomials to be expressed simply (but expressing polynomials as a sequence of coefficients, one for each exponent, is even simpler).
 
NeverthlessNevertheless, this task deals only with simple arithmetic.
 
The implementation here uses a shift/reduce parser to build a tree structure which J happens to support for evaluation:
6,962

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.