COP3503Group3-4 / Calculator-Project

Calculator Project
0 stars 0 forks source link

Hayden, RPN isn't working now #5

Closed corya14 closed 10 years ago

corya14 commented 10 years ago

Input: 7 - 4 splitInput vector: {7, -, 4} RPN vector: {7, 4} = 4

Something with the ~ change from last night. Fix this before you start working on implementing toString. I'm going to roll back the MAIT and working branches to the last working version. I'll keep your version in the master branch so it doesn't get lost. I am using the MAIT branch to test and I am not putting anything in the working branch unless it is absolutely working.

corya14 commented 10 years ago

I just noticed this because I was implementing Guorui's Subtract class and it wasn't working. I didn't make any changes to UserIO.

Inscribed commented 10 years ago

Damnit, alright I was worried that implementation would mess with the - operator I'm finishing up this essay and I'll hop on it, also I'm getting back to Gainesville later tonight and will hit the dungeon with any who's interested

On Sunday, April 13, 2014, corya14 notifications@github.com wrote:

I just noticed this because I was implementing Guorui's Subtract class and it wasn't working. I didn't make any changes to UserIO.

— Reply to this email directly or view it on GitHubhttps://github.com/COP3503Group3-4/Calculator-Project/issues/5#issuecomment-40318771 .

corya14 commented 10 years ago

Damian and I are at the dungeon. We'll be here all night looong.

Inscribed commented 10 years ago

Put on Digitally Imported Chillout radio! I'll join you guys in a few hours

On Sunday, April 13, 2014, corya14 notifications@github.com wrote:

Damian and I are at the dungeon. We'll be here all night looong.

— Reply to this email directly or view it on GitHubhttps://github.com/COP3503Group3-4/Calculator-Project/issues/5#issuecomment-40319073 .

corya14 commented 10 years ago

Whoops. I messed up my password and it didn't get my commit. If you need access to your "~" implementation look through the GitHub history.

corya14 commented 10 years ago

Hayden, just found another bug in the working version of RPN (the version before the ~ version)

Input: 5/1 * 5 splitInput vector: {5, /, 1, , 5} RPN vector: {5, 1, 5, , /}

The RPN output has / last. It should be 5 1 5 / *

There may be something wrong with your precedence checking. My guess is that the * token is read and pushed on top of of the / in the opStack when, instead, the / should be popped off the opStack onto the output because the precedence of / matches *

Inscribed commented 10 years ago

That will be an easy fix, I'll go ahead and fix that and push it real quick

On Sunday, April 13, 2014, corya14 notifications@github.com wrote:

Hayden, just found another bug in the working version of RPN (the version before the ~ version)

Input: 5/1 * 5 splitInput vector: {5, /, 1, , 5} RPN vector: {5, 1, 5, , /}

The RPN output has / last. It should be 5 1 5 / *

There may be something wrong with your precedence checking. My guess is that the * token is read and pushed on top of of the / in the opStack when, instead, the / should be popped off the opStack onto the output because the precedence of / matches *

— Reply to this email directly or view it on GitHubhttps://github.com/COP3503Group3-4/Calculator-Project/issues/5#issuecomment-40322583 .

corya14 commented 10 years ago

Yea it works for when * is first and / is second:

Input: 51 / 5 splitInput vector: {5, , 1, /, 5} RPN vector: {5, 1, *, 5, /}

Inscribed commented 10 years ago

Update : harder than abticipated to fix, I have a solution but no internet right now, heading back

On Sunday, April 13, 2014, corya14 notifications@github.com wrote:

Yea it works for when * is first and divide is second:

Input: 51 / 5 splitInput vector: {5, , 1, /, 5} RPN vector: {5, 1, *, 5, /}

— Reply to this email directly or view it on GitHubhttps://github.com/COP3503Group3-4/Calculator-Project/issues/5#issuecomment-40322648 .

corya14 commented 10 years ago

The fate of our grade rests in your hands.

Inscribed commented 10 years ago

We are fine, I promise, I'll make up for not being here this weekend and will stay up until sunrise if I have to... But I won't, Rpn 100 percent implemented by 1 am

On Sunday, April 13, 2014, corya14 notifications@github.com wrote:

The fate of our grade rests in your hands.

— Reply to this email directly or view it on GitHubhttps://github.com/COP3503Group3-4/Calculator-Project/issues/5#issuecomment-40330421 .