The Following 29 Users Say Thank You to kstep For This Useful Post: | ||
|
2011-01-12
, 17:29
|
|
Posts: 18 |
Thanked: 52 times |
Joined on Dec 2010
|
#2
|
|
2011-01-12
, 17:40
|
Posts: 1,522 |
Thanked: 392 times |
Joined on Jul 2010
@ São Paulo, Brazil
|
#3
|
The Following User Says Thank You to TiagoTiago For This Useful Post: | ||
|
2011-01-12
, 17:48
|
|
Posts: 18 |
Thanked: 52 times |
Joined on Dec 2010
|
#4
|
|
2011-01-12
, 18:02
|
Posts: 1,522 |
Thanked: 392 times |
Joined on Jul 2010
@ São Paulo, Brazil
|
#5
|
|
2011-01-12
, 18:21
|
|
Posts: 1,684 |
Thanked: 1,562 times |
Joined on Jun 2008
@ Austin, TX
|
#6
|
|
2011-01-12
, 18:50
|
|
Posts: 18 |
Thanked: 52 times |
Joined on Dec 2010
|
#7
|
The various bases, octal, hex, and decimal, are not modes in imitation of handheld calculators like most computer-based calculators.
|
2011-01-12
, 19:47
|
|
Posts: 1,684 |
Thanked: 1,562 times |
Joined on Jun 2008
@ Austin, TX
|
#8
|
Thank you for directions.
Of cause, I took a look at this calculator before, but I found it's interface counter-intuitive. It took me a lot of time to find bitwise "not", and once I found it, it takes me 3 clicks to do it (switch from numbers tab to bitwise-ops tab, click and hold "or", click "not") instead of one click. I see almost the same issue is *standard* arithmetic operations. And I can't just press backspace to delete last number, I have to put focus in input field first. I don't think it is usable, sorry. Although it's my IMHO..
As for It is true for my calculator as well. Pressing "Mod+2", for example, is the same as switching to 3rd tab in ejpi and clicking "0b" button.
And it has one big drawback for me: I can't see floating point numbers in any other numeral system but decimal (but this drawback have almost all calculators I have seen).
The difference between ejpi and procalc is in philosophy: procalc does not "convert" numbers from one numeral system to another (it stores all numbers as integers/floats/complex on the stack), it just *represents* numbers in different formats according user settings. All the stack at once. What is more convenient is for you to decide.
What about history… Well, the history in case of RPN calculator can be just a series of stack snapshots, so I think I will implement it a little later.
|
2011-01-15
, 15:37
|
|
Posts: 18 |
Thanked: 52 times |
Joined on Dec 2010
|
#9
|
|
2011-01-15
, 15:41
|
|
Posts: 18 |
Thanked: 52 times |
Joined on Dec 2010
|
#10
|
But none of them could show me number in hex/oct/bin (not to tell about floating point numbers in any other numeral system but decimal), and none of them could do bitwise operations on numbers (and it is really critical feature for me, as I have to work with bit-masks from time to time in my practice).
So I asked myself: “Am I a programmer or what?” And here it is: meet procalc, a programmer's calculator. It is in extras-devel and my garage already (https://garage.maemo.org/projects/procalc/).
It features hex/oct/bin/dec numbers representations (including floating point numbers), bitwise operations (and, or, xor, not, and not), complex numbers support, configured precision and three main view modes:
- normal to see numbers as usual,
- raw number view to give insight on inner machine numbers representation (all numbers are converted to unsigned 64-bit integers as bit-streams, so you can even see how double precision floats are presented in separate bits),
- exponential (or “scientific” as it's sometimes called), with numbers formatted as mantissa and exponent.
It is essentially an RPN calculator with a stack, but it can understand normal infix notation (it emulates it by sorting operators and numbers on stack according operations precedence), so you can use it as usual calculator if you don't touch stack control buttons at all.
As seeing is believing, screenshots are attached to this post.
Some key combinations:
1. It doesn't stop you from entering numbers in selected numeral system only (the one selected in main menu affect numbers display in stack and evaluation results representation only). To enter number in other numeral system but decimal, use "Mod+#" combinations, where # can be 2 for binary, 8 for octal or 16 for hexadecimal numbers, use "Mod+0" to go back to decimal input.
2. "C" is "Clear" input, "Fn+C" ("CA") is "Clear All" (both input and stack). "<<" and ">>" is bit shifts, "xBn" is to enter "e" for exponential numbers input, "Mod+xBn" ("+bj") is to enter "j" as postfix to designate imaginary part of complex number.
"Mod" also turns main arithmetic operation keys into statistics operators "σ" (standard deviation), "μ" (mean), "Π" (product), "gμ" (geometric mean) and "Σ" (summa). These operations work on whole stack, so to calculate sum of a set of numbers just push them onto empty stack one by one, push "Mod++" operation and hit "Execute" ("=" button).
3. Almost all onscreen keys have keyboard bindings.
All top row is for numbers input, Ctrl switches on Fn, backspace is a backspace and equal sign/comma/semicolon is for "=" button (a.k.a. "Execute").
Hexadecimal numbers "A"-"F" are uppercase keyboard buttons (i.e. press "Shift+A" to enter "A", "Shift+B" to enter "B" etc). Underscore (_) switches number sign to +/-, and dot (.) is for decimal point.
Star (* or letter "a"), plus (+ or letter "s"), minus (- or letter "f") and slash (/ or letter "v") are for multiplication, addition, substruction and division. Hash (# or "d"), ampersand (& or "k"), exclamation (! or "l"), letter "z" and dollar sign ($ or "x") are for XOR, AND, NOT, OR and AND NOT bitwise operations.
Parenthesis (letters "h" and "j") are for push and pop. Enter is for "=" ("Execute"). Backslash (letter "b") is for power, space is for push. "m" letter switches "Mod" button. "c" letter is for "Clear".
That's all for now. Maybe I have forgotten some details, as I am as developer know all this calculator's functions too well to understand they are unknown to end user, so if you have any questions feel free to ask them. Bug reports and feature requests are wellcome as well.
Project links:
Garage - https://garage.maemo.org/projects/procalc/,
GitHub - https://github.com/kstep/procalc/,
Ohloh - https://www.ohloh.net/p/procalc/.