Welp, I've finally decided to actually give this a shot. I've wanted to make a program derive equations that are fed into it.
I've gotten some functionality out of it...but I can only input in a certain format. I CANNOT have spaces in between terms and operators...
4x^2+2x+1 = OK
4x^2 + 2x + 1 != OK
I'm using Java for this, mainly because I don't know
squat about Regular Expressions, which are used in .Net. The only language of .Net I know worth anything is VB, which I still don't feel comfortable with, since I learned it on my own, and relied on a lot of my VB6 knowledge.
Any suggestions on how to go about this...?
And yes I know there are better ways to implement these things, but this is a rough version, I started it yesterday.
PS: It works for any terms (with no negative or multi-term exponents) (using the power rule)
f(x) = x^n ---->
f'(x) = nx^(n-1)I don't have any other rules coded out yet.
Here's the source code if you wanna look at it. It's just one file for now, with a small main method for testing.
Function.zip ( 1.73k )
Number of downloads: 10This post has been edited by Locke37: 25 Sep, 2008 - 02:23 PM