XD Is it really THAT bad? ;D
Heehee, aren't polynomials fun? :P
Type: Posts; User: snowguy13
XD Is it really THAT bad? ;D
Heehee, aren't polynomials fun? :P
You're welcome!
Hehe, yeah. I'm in Calculus BC right now, and we just touched on polynomial division again because of partial fraction decomposition. I hadn't used it for at least a year before...
Ah, that's very cool!
EDIT: I tried out your program, and it looks great! Something maybe to add (if you want to keep going with this): a recent history of operations the user has done (the addends,...
You're welcome! So, I'm curious, what is the extent of this program's functionality? How much and what will it do when it's done?
I've never worked with TreeMap before, but would it be possible for you to move through the keys backwards?
You can class cast objects to other objects; so, as long as the inputs to your TreeMap...
Using this regex: "-?\d{1,}(x(\^-?\d{1,})?)?" (remember to add another \ before special characters)
And the input String: "-12x^-5+6x^3+3x-5", and only accepting group zero (the entire regex), I...
Hahaha :D I'm gonna go to sleep for tonight, but I'll check out that code tomorrow! Good night! :)
I found this (link for more detail):
get(Object key)
Returns the value to which the specified key is mapped, or null if this map contains no mapping for the key.
Hopefully that helps?
Also,...
Hmm... Well, if your polynomial terms are always going to be surrounded by spaces, you could use another regex, and the <String>.split(String regex) method:
Use this regex: "\s[+-]\s"
And the...
I've been reading, and now I can help you with that! *cheesy superhero fanfare plays*
In a regex String, you can use the character ? to check if a certain character or character class occurs ONCE...
@Sean4u
That seems utterly and incredibly fascinating. I now go to read.
Thank you very much; I hadn't even heard of regular expressions until now!
I'd work through the order of operations backwards. First, get rid of any spaces. Then, separate the String by its '+' and '-', so that all additive parts of the polynomial are separated. After that...