The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.
Beat me to advocacy of RPN. There was a small amount of time getting used to my first HP calculator in college. After that, I almost can't use a standard one. I grimace when forced to use a calculator with an equals button.
PCalc on my phone allows RPN, so, I'm mostly happy after the screen died on my HP48.
I already knew RPN from FORTH before I ever got a programmable calculator. FORTH's most important data structure is the stack and RPN just shows in which order parameters are pushed onto the stack and processed by operators. Just one step away from assembly, but a very neat language.
I have lived with several Zen masters - all of them were cats.
His last invention was an evil Lasagna. It didn't kill anyone, and it actually tasted pretty good.
If you do precisely the same key / button sequence in scientific mode, it gives the answer 24. Given that I use calculator in both modes, but most of the time just use whatever mode it re-opens in for a quick calculation, this is a bit of a worry... Never noticed it before. The behaviour is the same in the Windows 8 calculator too.
I can see why (with no parentheses available in "standard" view) but it's not exactly intuitive. Would help if the history automatically inserted parentheses where default operator sequence has been used.
If you think about it, it's not really a problem.
Those who are used to the "Proper" way of doing things will automatically make sure it's in "Scientific" mode before they do anything (mine lives in "Programmer" mode even though I rarely use it); those who are used to an "old fashioned" cheapo desk calculator will leave it in "Standard" so the additional buttons don't confuse them ...
Sent from my Amstrad PC 1640 Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
You will agree with me when i say that it is possible to omit checking if it is in scientific or standard mode. And why should i, if i wan't to perform some basic calculations.
Then to confirm the result i will check the history, i see correct equation and i assume result is correct. It could be, but not necessary.
In win7 at least you had different forms of calculator, so you can easily see which mode you are using.
In win10 if you don't pay attention to exact buttons (and why should you, if you use physical keyboard), you can't tell, since both calculators are of same size. This is very poor UX.
I agree. I normally only need standard mode and will switch to it, if I have other windows open in the background and don't want the thing taking up half the screen. Other times though if it's in scientific and I've got multiple screens or not doing other stuff, I'll leave it like that. (I use the Win8 calculator, even on Win10, as it saves so much real estate.) I must say I'd never considered the results of my calculations would differ depending on how many buttons I had on screen.
mine lives in "Programmer" mode even though I rarely use it
programmer mode can't use / don't give real / floats
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpful answers is nice, but saying thanks can be even nicer.
In APL, all operators have equal precedence. To a certain degree, I can understand the arguments for it.
For the very basic operators, it is easy to follow: Do multiplications before additions. But advanced programming languages (APL not the least) has so many operators for which there is no obvious or "natural" precendece. If you want to minimize the number of parentheses, you must have a list of operator precedence available at all times.
I guess that you can trust Visual Studio graying down "unneccessary" parentheses, and remove those. But when you read such minimal-parentheses code, you need that precedence list to see what is happening. You see lots of programmers adding "unneccessary" parentheses so that their C code looks halfway like Lisp , "just to be sure", and in a hardcopy output you have a terrible job finding the matching parenthesis. As a general rule: If your program code to any significant degree depends on operator precedence, or multiple levels of parentheses to override the defaults, then you need to break down your expressions into simpler sub-expressions. The compiler will anyway assign a memory location to hold the value of each subexpression, so you might as well do it yourself, and give a descriptive name to it!
In languages like APL there is one single rule: Left-to-right. Any parenthesis indicates a deviation from this rule: Watch out! So APL programs are never Lisp-like (well, that is one of the reasons ). I sort of like it. Even though I grew up with "multiplications before additions", I cannot off hand tell whether a logical XOR is done before or after a logical shift or an equality test. Which operators have higher precedence tahan preincrement but lower than postincrement? I don't know. I can't list those lower than preincrement, and can't tell just why bitwise negation goes before casting, while logical OR goes after. APL never gives you problems like this.
But, idea behind calculator is: in Standard mode any new operation it calculates as x += 1 or x *= 2, so new operation is applied to result of all previous operations. Which, personally, i don't like, because this can be achieved by pressing "=" button after every operation, but i can understand.
Anyway, problem to me is not this Standard vs Scientific (although using 2 different design algorithms in 1 program is usually really bad thing to do), but that History contains wrong equation. Which means that if you didn't check in which mode you are, result that you used can be wrong. Which can induce different set of problems.
48 is correct, as per natural [germanic based] language which is expressed left to right. same way you read a sentence, in the order presented.
it's 24 if it's "bodmas", but seeing as bodmas is younger than natural language it's absolutely not new math rules,
in fact it's the original and oldest math rules.
and btw: any accountant
1. will tell you 4 X 3 + 4 X 3 = 48, anything else and the auditors will have your skin.
2. in accounting brackets BRACES mean something completely different than others suggest,
.... i.e. 4 X 3 + (4 X 3) = 0 ... 4 X 3 + (4) X (3) = 48 ... 4 X (3 + 4) X 3 = -84
so those old rules are:
- still very much alive
- very important to the person that provisions the money for your pay/salary.
The simple calculator chains together what you are entering following the natural reading order. This has been known as the Arithmetic Order of Operations.
The Algebraic Order of Operations (FOIL, PEMDAS, et al) is followed by the scientific calculator; and is like "compiled" programming, in which you can declare an object anywhere within the class, before or after it is called.
Director of Transmogrification Services
Shinobi of Query Language
Master of Yoda Conditional