Why is there a different button for 'minus' and 'negative' on a calculator?

8k Views Asked by At

Perhaps this is more of a programming question than anything else, and if so I'll gladly migrate it on over to StackOverflow, but I think this site might be a bit more suited. My question is: "why are there two different buttons for 'minus' and negative' on a calculator?". To my knowledge, they are treated the exact same way, the only different being that minus is binary, and negative is unary. Other than that, I don't see any difference. So why do calculators have two separate buttons for them? In programming languages, there is no distinction between the minus and negative signs, it is only calculators that make the distinction. Is it for the reason I stated, or is it something completely different? I don't see how the unary vs. binary would have anything to do with how a calculator computes something, but I can't think of any other reasons. Does anyone know why?

P.S. If it is for the reason I stated, could someone explain why that would affect how a computer calculates the value of an expression?

3

There are 3 best solutions below

1
On

The negative sign multiplies the number by -1. Minus subtracts the number, which is a completely different operation. The difference lies in where you can use it, as a minus sign cant be used on the first number you write, as there is nothing to subtract it from, and you cant use a negative between 2 numbers, as there is no operation happening between them.

0
On

I've had the same question, regarding an infix notation scientific calculator (where you enter the formula to calculate on a separate line, with ability to move the cursor and edit the formula at any point), e.g. a Casio FX series. Casio has the (-) unary minus key, which I never use and think it would be better if it did a more useful and common function. In Casio FX, the regular (binary) minus can also be used for negation, as you would in a programming language. So in any particular formula, there's no difference at all between using − and - on a Casio FX. Expressions like −1−2, or 2^−2 give same result as if you would use the negation key for negation. The only difference I could find so far is - after you perform any calculation, and then press any of the 4 main arithmetic operator buttons (without clearing with "AC" first), the calculator will start the new formula with "Ans" followed by the operator. Ans refers to the result of the last calculation. If using the (-) key, the calculator will not insert "Ans" and will start a new formula from scratch (the - operator). I don't find it useful since I have a habit of always clearing the input using the AC button.

0
On

For a simple calculator that calculates an expression as you go along, there need to be two different buttons for "multiply by $-1$" and "subtract."

The "multiply by $-1$" button (often shown as "$+/-$") immediately changes the display to the additive inverse of the number: $9$ goes to $-9$ immediately after you push the button.

The "subtract" button (often shown as "$-$") needs more input afterwards, namely the amount you want to subtract.

On more sophisticated calculators where you can enter an entire expression at once, like:

-0.85-(2/3.7)^2

the extra button isn't really necessary, since you're entering the expression symbolically, and the calculator parses it symbolically as well.

Basically, the two buttons are the minimum necessary user interface for the particular chip set in the calculator.