|
|
HP 48GX emulator
Although not entirely related to a command line calculator -- I think the best calculator is the Hewlett-Packard 48GX -- which I used to use all the time for my undergrad degree. Although the RPN takes a bit of time to get used to (about a week or so) -- after you do get used it -- then you'll realize how much easier it is. RPN basically works as follows: Instead of entering "1 + 1 =" you would enter "1 ENTER 1 ENTER +" Which seems completely stupid, until you start to use it for a while, and then it suddenly makes so much sense you won't be able to go back to a normal calculator. Especially for complicated calculations.
HP 48GX emulator
It's called 'postfix' math, and the HP calculator is a common teaching tool in introductory programming classes, because [a] it's a great way to reduce ambiguity in your notation, and [b] it's a great way to teach about stack based data structures. Consider:
The thing to notice is that you keep adding values to your 'stack' until you hit an operator, at which point you pop the top two items off the stack and apply the operator to those two items, placing the resulting value back on the stack, and you repeat this process until the stack is reduced to a single value. figuring out the strategy used by HP's calculators is a great way to learn about stack structures, and knowing how to work with stacks makes all kinds of programming problems easier (stacks describe the most recent web pages visited, the order you're allowed to use tags in valid HTML/XML documents, etc). I hated that class but I'm glad I understand the material... ;) |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.21 seconds |
|