I was going to say that this applies only to old versions of calc, but the calc.exe in W7 has a cube root button, and also a generic y root of x button... but no sqrt. O_o
The reason (of course) is operator precedence; in standard mode it's interpreted as "1 + 2 =" then "* 3 =", while in scientific view it respects BODMAS.
But to me it's counter-intuitive that changing the View also changes the Mode of operation.
If they'd just named that menu "Mode" instead of "View" I'd be fine with it.
I've used cheap scientific calculators that perform operations from left to right. It's awful when you are answering a uni exam and you don't know why the results you get looks fishy.
On computer calculators, I always type "1 + 2 * 3 =" as "2 * 3 =", "+ 1 =" because I learned the hard way that I can't asume that a calculator is going to respect order of precedence or not.
I think the first calculator I used was one of those. It took me till college and programming before I really properly learned precedence because I never trusted any calculator I was using, and always used parentheses.
This also kind of influences my programming, probably for the better - I would rather use parens and be clear than be ambiguous and trust that my interpreter and I agree on what has proper precedence.
I think it's because non-mathematical people tend to use calculators in the 'broken' way. Their thought process is "ok, 1+2" (implicit equals) "times 3".
It reflects the old paper tape usage model, where you typed it in in the order you wanted to perform the operations.
Apple's Calculator.app works similarly, although their default state is better. If you open up the "Shown Paper Tape" window, and type "1 + 2 * 3 [enter]", it replies "1 + 2 * 3 = 7" If you then type "1 + 2 [enter]", it replies "1 + 2 = 3", then if you hit " * 3 [enter]" it replies "1 + 2 * 3 = 9".
I'm running calc.exe on Windows XP, and while it is true that there is no square root button, square roots may be calculated using Inv x^2. The Inv checkbox also enables cube roots (Inv x^3), exponentials (Inv ln and Inv log), and the usual inverse trig functions.
You find this out by right-clicking the x^2 button and clicking What's This. The popup explains the Inv^2 trick -- to my recollection it's been like that since Windows 95.
I disagree. One can use square roots to find the roots of quadratic equations (for example the equation for the velocity of a projectile) without needing to know that sqrt(x)=x^1/2.
The point he or she was making was that a person that doesn't know that sqrt(x)=x^1/2 probably wouldn't be calculating the for example velocity of a projectile
This really gets to usability. Most scientific calculators I have owned have a y^x key AND a √ key. Most have a cube root key as well. √ is a very common operation and with its own key can on many models be applied to a result with a single key press (it often works immediately and the = is not even necessary.) y^x to indicate square root can be applied to a result with ^,0,.,5,= -> 5 key presses, or 4 if continuing without having to finalize the calculation. Given that √ is a common operation, 4 or 5 key presses for it is pretty ineffective compared to 1 key press.
23 comments
[ 541 ms ] story [ 991 ms ] threadsome other nice tools there too.
edit: Doh! That's what the linked page says. In my defense I have a horrible connection tonight and it didn't load until just now :)
edit 2: Lol@ the itchy trigger-finger. Isn't that what the downvote karma limit is for? :)
On "Standard" view, type:
1 + 2 * 3 =
Answer comes back as 9
Switch to "Scientific" view and type the same,
Answer comes back as 7
The reason (of course) is operator precedence; in standard mode it's interpreted as "1 + 2 =" then "* 3 =", while in scientific view it respects BODMAS.
But to me it's counter-intuitive that changing the View also changes the Mode of operation.
If they'd just named that menu "Mode" instead of "View" I'd be fine with it.
On computer calculators, I always type "1 + 2 * 3 =" as "2 * 3 =", "+ 1 =" because I learned the hard way that I can't asume that a calculator is going to respect order of precedence or not.
This also kind of influences my programming, probably for the better - I would rather use parens and be clear than be ambiguous and trust that my interpreter and I agree on what has proper precedence.
And if the software has the capability to do it right why bother building in a 'broken' mode.
Apple's Calculator.app works similarly, although their default state is better. If you open up the "Shown Paper Tape" window, and type "1 + 2 * 3 [enter]", it replies "1 + 2 * 3 = 7" If you then type "1 + 2 [enter]", it replies "1 + 2 = 3", then if you hit " * 3 [enter]" it replies "1 + 2 * 3 = 9".
The '=' key will do the same.
The point he or she was making was that a person that doesn't know that sqrt(x)=x^1/2 probably wouldn't be calculating the for example velocity of a projectile