Questions tagged [math-expression-eval]

Questions related to the parsing (and possibly the evaluation) of free-form mathematical expressions in strings, lists, or streams

10 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
5
votes
0answers
565 views

Standard Algebraic Derivative Calculator

I had some difficulty with this problem, so I'm sure there is a better way. Here is the question from SICP: Exercise 2.58 Suppose we want to modify the differentiation program so that it ...
3
votes
0answers
83 views

Parser for an bifurcation analysis tool

So during my thesis I used xppaut quite extensively. In the end there were some minor problems and I decided to have a look at the code, which was just released at github. So after 30 years of on and ...
3
votes
0answers
673 views

Expression parser using Shunting-yard algorithm

I've been working on a expression parser which will be part of another project (some sort of DSL). This parser basically uses the Shunting-yard algorithm, except for the case of parenthesis: here it ...
3
votes
0answers
99 views

Expression parsing (arithmetic operators only)

As a self-learning project, I wrote an expression parser using the shunting yard algorithm in JavaScript. It's a larger part of what I plan to be a program for handling dice expressions in tabletop ...
3
votes
0answers
597 views

Parsing an infix notation expression and converting to reverse polish notation

I'm pretty new to Go, and I do not know the best or idiomatic ways to do most of the stuff, so I'd appreciate feedback on how to make my code better, faster or more idiomatic. My program is a set of ...
2
votes
1answer
69 views

Python implementation of Conway's chained arrow notation

A year ago, I implemented an evaluation algorithm for Conway's chained arrow notation in Python. I'd like to get a review on my code, especially about readability and if it is pythonic. I'd also like ...
2
votes
1answer
106 views

Calculate arithmetic expression represented by a string, in Java

I saw that interview question online and gave it a try: Implement a function that gets a string which represents an arithmethic expression: contains only numbers or the the operators: '+', '-', '*', '/...
2
votes
0answers
60 views

RPN calculator in Chicken Scheme

My first attempt at Scheme (Chicken Scheme) - a simple RPN calculator. Please comment on exception handling as well as the general coding style. Here is the code: ...
2
votes
0answers
501 views

Binary Expression Tree

I implemented a binary expression tree, I've used my previous shunting-yard parser to provide it the post-fix expression. I have a few specific questions outside of just comments about making it ...
1
vote
0answers
405 views

Infix to RPN converter using the Shunting-Yard Algorithm

I need to be able to parse simple equations in an app I'm writing, and decided to try writing my own parser. I ended up using the Shunting-Yard Algorithm to convert from infix notation to RPN as the ...