50th post.
Hmm, my solution:
OPEN the brackets!
So, do:
repeat until (problem) doesn't contain [ ) ]
scan for first instance of [ ) ] in (problem)
find first instance of [ ( ] before first instance of [ ) ] in (problem)
if (symbol before it) = +
delete brackets
if (symbol before) = -
replace all + with -
replace all - with +
remove brackets
etc.
Get it?
Last edited by Hardmath123 (2011-03-31 10:16:31)
Offline
Hardmath123 wrote:
50th reply.
Hmm, my solution:
OPEN the brackets!
So, do:
repeat until (problem) doesn't contain [ ) ]
scan for first instance of [ ) ] in (problem)
find first instance of [ ( ] before first instance of [ ) ] in (problem)
if (symbol before it) = +
delete brackets
if (symbol before) = -
replace all + with -
replace all - with +
remove brackets
etc.
Get it?
Not exactly...
Which member will do this?
Offline
I guess I will...
Basically,
1 + (2 - (3 + 4)) becomes:
1 + (2 - 3 - 4)
1 + 2 - 3 - 4
3 - 3 - 4
0 - 4
-4
The idea is to not solve anything until all brackets are out of the way.
Last edited by Hardmath123 (2011-03-31 10:30:04)
Offline
Ah. I get it now.
Offline
You're one of the few active people...
Offline
I know...
EDIT: "Few?" I haven't seen anyone but me and you.
Last edited by scimonster (2011-03-31 10:41:36)
Offline
Oh my, I'll have to make backgrounds that say Xenon now! D:
Hardmath123 wrote:
1. What's 'OOO'?
2. TheSuccessor, my mistake. I thought I included you when I said You cna help to applejack. So, YEAH, you can help.
3. I like scimonster's engine. Thanks!
4. How 'bout we call this Xenon?
Offline
Few??? I'm active everyday, when you're sleeping. You're active when I'm sleeping, usually. I'm guessing you're on the east coast. they have more educated people there.
scimonster wrote:
I know...
EDIT: "Few?" I haven't seen anyone but me and you.![]()
![]()
Offline
Hardmath123 wrote:
You're one of the few active people...
I'd be active if you told me what to do
Offline
scimonster wrote:
I know...
EDIT: "Few?" I haven't seen anyone but me and you.![]()
![]()
Sorry I haven't been active...it's a rather annoying thing called school
How do we plan to allow for functions that are not single character, but a short string, a.k.a. sin (x), sqrt(x), etc ?
Also, instead of distributing the operator to the contents of a parenthesis, why don't we just evaluate the contents of the parenthesis, and then use the operator on the result? I feel like distributing the operator is needless hassle. Correct me if I'm wrong, please.
Offline
Hardmath123 wrote:
I guess I will...
Basically,
1 + (2 - (3 + 4)) becomes:
1 + (2 - 3 - 4)
1 + 2 - 3 - 4
3 - 3 - 4
0 - 4
-4
The idea is to not solve anything until all brackets are out of the way.
Wouldn't that be harder? Instead make a program that splits it into a list with different characters, and search for "(" and ")". Then make it evaluate the expression between those( tell me if you want me to do it.)
Offline
This is what I did so far
Tell me what you think. It's still rather slow though. And very primitive and clunky. But it works (I think).
Offline
Um, it didn't solve anything.
Maybe we need to invent some special characters to mean multiple character things.
Offline
lemonpretzel wrote:
Hardmath123 wrote:
I guess I will...
Basically,
1 + (2 - (3 + 4)) becomes:
1 + (2 - 3 - 4)
1 + 2 - 3 - 4
3 - 3 - 4
0 - 4
-4
The idea is to not solve anything until all brackets are out of the way.Wouldn't that be harder? Instead make a program that splits it into a list with different characters, and search for "(" and ")". Then make it evaluate the expression between those( tell me if you want me to do it.)
You would WANT it to go like this:
1 + (2 - (3 + 4))
1 + (2 - 7)
1 + -5
-4
Offline
bbbeb wrote:
lemonpretzel wrote:
Hardmath123 wrote:
I guess I will...
Basically,
1 + (2 - (3 + 4)) becomes:
1 + (2 - 3 - 4)
1 + 2 - 3 - 4
3 - 3 - 4
0 - 4
-4
The idea is to not solve anything until all brackets are out of the way.Wouldn't that be harder? Instead make a program that splits it into a list with different characters, and search for "(" and ")". Then make it evaluate the expression between those( tell me if you want me to do it.)
You would WANT it to go like this:
1 + (2 - (3 + 4) )
1 + (2 - 7)
1 + -5
-4
Yeah, pikachu would.
(That is you in April Fools change.
)
Offline
Hardmath123 wrote:
You're one of the few active people...
Somebody messed with this post. I posted y o u ' r e, not pikachu're (I'm not that bad at grammar)
EDIT: I whenever I type y ou (without the space), it says pikachu! Quote this if you don't believe me!
you
Last edited by Hardmath123 (2011-04-01 09:27:58)
Offline
Hardmath123 wrote:
Hardmath123 wrote:
You're one of the few active people...
Somebody messed with this post. I posted y o u ' r e, not pikachu're (I'm not that bad at grammar)
EDIT: I whenever I type y ou (without the space), it says pikachu! Quote this if you don't believe me!you
Happy April Fools Day! I suspect that everything will be back to normal by tomorrow
Offline
Paddle2See wrote:
Hardmath123 wrote:
Hardmath123 wrote:
You're one of the few active people...
Somebody messed with this post. I posted y o u ' r e, not pikachu're (I'm not that bad at grammar)
EDIT: I whenever I type y ou (without the space), it says pikachu! Quote this if you don't believe me!you
Happy April Fools Day! I suspect that everything will be back to normal by tomorrow
![]()
Yeah...
At first I was like "what are you doing here?" then I saw your post.
Why would a bunch of fluffy kittens be posting here?
Offline
scimonster wrote:
bbbeb wrote:
lemonpretzel wrote:
Wouldn't that be harder? Instead make a program that splits it into a list with different characters, and search for "(" and ")". Then make it evaluate the expression between those( tell me if you want me to do it.)You would WANT it to go like this:
1 + (2 - (3 + 4) )
1 + (2 - 7)
1 + -5
-4Yeah, pikachu would.
(That is you in April Fools change.
)
True. Actually, that's a good idea!
@hpotter134, that engine is a bit clunky. Did you mess with the setup engine?
Offline
My submission, a very basic calculator.
Here ya go for my submission
It's pretty basic but it works
Offline
Necromaster wrote:
My submission, a very basic calculator.
![]()
Here ya go for my submission
It's pretty basic but it works
Hmm, I will have to improve on yours.
Offline
scimonster wrote:
Necromaster wrote:
My submission, a very basic calculator.
![]()
Here ya go for my submission
It's pretty basic but it worksHmm, I will have to improve on yours.
Yeah
Please do
Offline
Necromaster wrote:
scimonster wrote:
Necromaster wrote:
My submission, a very basic calculator.
![]()
Here ya go for my submission
It's pretty basic but it worksHmm, I will have to improve on yours.
Yeah
Please do![]()
I will in a couple days, I'm going to be away.
Offline