# Rpn Base Calculator Issue

5 replies to this topic

### #1 m4x

m4x

Newbie

• Members
• 18 posts
• Location:Poland

• Calculators:

Posted 10 February 2005 - 07:29 PM

Hi all,
I've noticed such a thing in the RPN Base Calculator:
When I want to calculate 10/5 for example and I press: 1' /> EXE' /> 5' /> I get 0.5. It calculates the other way round. It should take the first number I've typed in and divide it by the second, but instead it takes the number highest in the stack and divide it by the second in the stack. I know that RPN Base Calculator is mainly for Base conversions and few people use the Reverse Polish Notation, but I think it's a major issue I describe here. If you actually wanted to use it for operations you would get inverted division results. Perhaps the input line could've been at the bottom and the stack would fill upwards.

Regards

### #2 BiTwhise

BiTwhise

Casio Overgod

• [Legends]
• 627 posts
• Gender:Male
• Location:Guildford, Surry, UK
• Interests:Programming, games, consoles, martial arts

• Calculators:

Posted 16 February 2005 - 05:59 PM

looks like the correct behaviour for an rpn calculator to me..
it would take the last number pushed on to the stack as the first parameter to the operation applied, ie 10 5 / -> .5

### #3 R00KIE

R00KIE

Casio Freak

• Members
• 155 posts
• Location:Portugal
• Interests:Electronics, games, programming

• Calculators:
HP49G ROM 1.24; CASIO CFX-9850GB PLUS;CASIO FX-6300G; CASIO FX-82TL

Posted 17 February 2005 - 03:19 PM

2 is the correct answer not 0.5, you did something wrong. maybe 5 enter 10 /

### #4 m4x

m4x

Newbie

• Members
• 18 posts
• Location:Poland

• Calculators:

Posted 18 February 2005 - 11:03 AM

I've got another calculator which has RPN and when I input
10 ent 5 /
it gives 2.
Same with substraction:
5 ent 3 -
gives 2, while CP gives -2.

When you input 10 ent 5 / this means: 10/5 and the answer should be 2 not 0.5 as CP says. Classpad does it in reverse. It's not how the RPN works.

### #5 BiTwhise

BiTwhise

Casio Overgod

• [Legends]
• 627 posts
• Gender:Male
• Location:Guildford, Surry, UK
• Interests:Programming, games, consoles, martial arts

• Calculators:

Posted 19 February 2005 - 04:55 PM

I stand corrected.
From a programming perspective it just seemed more natural, maybe that's the cause of the error as well

### #6 m4x

m4x

Newbie

• Members
• 18 posts
• Location:Poland

• Calculators:

Posted 19 February 2005 - 06:19 PM

From a programming perspective it just seemed more natural

<{POST_SNAPBACK}>

Yes, I agree.
But It's rather illogical when it comes to doing math operations on a calculator.
Perhaps if the stack was pushed upwards it would be more natural as for RPN.

I think that the error may be very simple - maybe a simple swapping of the input line variable with the stack's first position variable in the code where the math is being done could do it.

#### 0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users