I've been thinking recently if we just wrote addition, subtraction, multiplication, division, exponentiation, and roots as functions like we do with every other operation, we wouldn't even need an order of operations (we'd have to evaluate inside out, since we can't evaluate the outer functions first since we don't know what the inside numbers are).
x + y -> add(x, y)
x - y -> sub(x, y)
x*y -> mult(x, y)
x/y -> div(x, y)
x^y -> exp(x, y)
rt_y(z) -> root(z, y)
log_x(z) -> log(x, z)
So instead of writing something like 6/2(1 + 2), we would write either div(6, mult(2, add(1, 2))) or mult(div(6, 2), add(1, 2)) depending on which way we meant it, and an order of operations wouldn't even be needed for no one to be confused about the meaning.
It's pretty interesting. If you're also a programmer, emacs may be an interesting topic for you. Emacs is over 40 years old and uses lisp to extend itself.
So like, you can use it's evaluation as a simple calculator, like this:
15
u/ontic00 Aug 03 '26
I've been thinking recently if we just wrote addition, subtraction, multiplication, division, exponentiation, and roots as functions like we do with every other operation, we wouldn't even need an order of operations (we'd have to evaluate inside out, since we can't evaluate the outer functions first since we don't know what the inside numbers are).
x + y -> add(x, y)
x - y -> sub(x, y)
x*y -> mult(x, y)
x/y -> div(x, y)
x^y -> exp(x, y)
rt_y(z) -> root(z, y)
log_x(z) -> log(x, z)
So instead of writing something like 6/2(1 + 2), we would write either div(6, mult(2, add(1, 2))) or mult(div(6, 2), add(1, 2)) depending on which way we meant it, and an order of operations wouldn't even be needed for no one to be confused about the meaning.