• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Programming (C#) Infix->Postfix->Evaluation

ApacheChief

Senior member
Download (with source) www.insolence9.com/downloads/SBN.zip

I'm making a little interpreter, and I am currently trying to solve expressions, I'm wondering how I'm doing. I can't really find any good C# forums, so also if anyone knows of any please let me know 🙂

Anyway, I need a _very_ complicated and long equation to test this with (EXE in the bin/debug folder).

I just got home from school, very excited, if I left anything out please ask 🙂
 
Just beginning to learn about it 🙂 Not really sure what they are yet, I keep seeing stuff like this to generate grammars:
$something = 1
| 1
| 2;
 
Hehe... I've got just such an equation. I solved something analytically for a math project last year but ran out of time trying to crunch all the numbers. This might be a little overkill, so don't take it personally if your program can't do it. 😛

http://it.che.wustl.edu/~reillyma/che515/final.doc

The first equation on page 6 immediately comes to mind as the real bastard. J0 and J1 are Bessel functions which are infinite sums in and of themselves (not sure how much math you know). I'll try to run it on my end if I can figure out your program and see what happens. There are less demanding equations in there as well that might be a better test, like on page 8 and 9 - that one is just by far the most extreme.

edit: Maybe I'm thinking of the wrong kind of solver... What exactly does this thing do? How do I need to input an expression?
 
Well it's pretty simple, type it in at the top, press interpret, it spits out an answer at the bottom, or gives you an error. Sorry, should've documented it a bit more. thanks for contributing, reading the file now 🙂

EDIT:
It doesn't solve for variables or anything, so you'll have to plug 'em in manually. Sadly it's not meant for things like that 🙂
 
Originally posted by: insolence
Well it's pretty simple, type it in at the top, press interpret, it spits out an answer at the bottom, or gives you an error. Sorry, should've documented it a bit more. thanks for contributing, reading the file now 🙂

EDIT:
It doesn't solve for variables or anything, so you'll have to plug 'em in manually. Sadly it's not meant for things like that 🙂
OK, that's about what I figured. It doesn't do summations or anything then, correct? Hard to get a CPU-intensive equation without some kind of ridiculous sum. 😛 I'll give it a whirl tonight and see what I can see.
 
Back
Top