Post Reply 
RPNcalc+ free colorful web calculator
11-04-2020, 04:33 PM (This post was last modified: 11-04-2020 05:06 PM by radulle.)
Post: #1
RPNcalc+ free colorful web calculator
Hello, my name is Nikola Radulaški, I'm from Belgrade, Serbia. At university during my structural engineering studies, 15+ years ago, I was in love with my HP49+ and how elegant RPN/RPL was. It has helped me tremendously and I am sure it would have been much harder to pass all those written exams if I were without it. Leather case might have degraded heavily but device is still functional and from time to time I still play around with it.
I wanted to pay homage to this beautiful device so I decided to make an accessible and fun to use web calculator so that I could teach RPN to my kids when they are old enough. I went a bit overboard and RPNcalc+ was born.
Reverse Polish Notation Calculator Plus (RPNcalc+) is:
  • RPN calculator (classical RPN with limitless stack)
  • free
  • open source
  • small (~50kB)
  • PWA (installable, works offline, standalone, mobile friendly)
  • colorful and fun to use
  • full keyboard shortcuts (hold F1 or ALT)
  • history of commands
deployed at https://rpncalcplus.web.app and https://rpncalculator.web.app while code is freely available at https://github.com/radulle/rpncalcplus.
I really hope you take some time try it out, enjoy it and give feedback what should be improved or if you notice any bugs. My plan is to publish it also on Android and iOS stores when it is a bit more mature. Still, I think it is very functional as it is.
[Image: 2.png]
[Image: 4.png]
Find all posts by this user
Quote this message in a reply
11-05-2020, 04:38 AM
Post: #2
RE: RPNcalc+ free colorful web calculator
Nice work, thank you!
Find all posts by this user
Quote this message in a reply
11-05-2020, 11:19 PM
Post: #3
RE: RPNcalc+ free colorful web calculator
(11-05-2020 04:38 AM)John Galt Wrote:  Nice work, thank you!

Thanks for a compliment, I really hope people get to enjoy it and I get some feedback on what needs improvement.
Find all posts by this user
Quote this message in a reply
11-06-2020, 11:27 AM
Post: #4
RE: RPNcalc+ free colorful web calculator
I like it! I was surprised, though, when I left and re-entered SHIFT mode, to find INV was sticky.

Also a little surprised that log and ln are main functions, with e^x and 10^x as INV functions - I'd certainly have put that the other way around. (As google's calculator does, for example.)
Find all posts by this user
Quote this message in a reply
11-06-2020, 10:10 PM
Post: #5
RE: RPNcalc+ free colorful web calculator
(11-06-2020 11:27 AM)EdS2 Wrote:  I like it! I was surprised, though, when I left and re-entered SHIFT mode, to find INV was sticky.

Thank you, I missed that, I'll see to it that it is fixed soon, still work in progress Big Grin.

(11-06-2020 11:27 AM)EdS2 Wrote:  Also a little surprised that log and ln are main functions, with e^x and 10^x as INV functions - I'd certainly have put that the other way around. (As google's calculator does, for example.)

Good point but to be honest I much more commonly use LN and LOG than e^x and 10^x and they even have alternatives like e ^ and EXP. On my HP49G+ they are on the same level while on RealCalc LN and LOG are main keys.

What do you think about history, is it be useful?
Find all posts by this user
Quote this message in a reply
11-07-2020, 01:23 PM (This post was last modified: 11-07-2020 01:25 PM by Maximilian Hohmann.)
Post: #6
RE: RPNcalc+ free colorful web calculator
Hello,

(11-06-2020 10:10 PM)radulle Wrote:  What do you think about history, is it be useful?

The question is not addressesd to me, but my answer would be: Yes :-) Especially if the history is editable so that mistakes can be corrected or the calculation repeated with different values - a kind of "narrowtrack" programming option. I know this from other calculators.

Apart from that it looks like a really nice calculator. I'm looking forward to see it on the mobile phone! The remainder of my wish list (#1 is the mobile app) would be more memories (for STO and RCL) and a choice of colour schemes for the display. I am not the biggest fan of black on grey liquid crystal display.

Regards
Max
Find all posts by this user
Quote this message in a reply
11-07-2020, 02:10 PM
Post: #7
RE: RPNcalc+ free colorful web calculator
Agreed, history is a nice feature. The keyboard shortcuts too - and the ALT mechanism.
Find all posts by this user
Quote this message in a reply
11-08-2020, 06:38 PM
Post: #8
RE: RPNcalc+ free colorful web calculator
(11-07-2020 01:23 PM)Maximilian Hohmann Wrote:  Especially if the history is editable so that mistakes can be corrected or the calculation repeated with different values - a kind of "narrowtrack" programming option. I know this from other calculators.

I thought of making history editable but I'm not sure if changing operators should be allowed. Idea of narrow-track programming sounds interesting. Maybe user could pick commands from the history and than substitute desired values for X, Y or Z. Than he would be able to save that sequence and run it as any other operator. Was this what you had on mind? I see how this could be useful even without loops and conditionals.

(11-07-2020 01:23 PM)Maximilian Hohmann Wrote:  I'm looking forward to see it on the mobile phone! The remainder of my wish list (#1 is the mobile app) would be more memories (for STO and RCL) and a choice of colour schemes for the display. I am not the biggest fan of black on grey liquid crystal display.

It is already optimized for mobile and if you use Chrome on Android you will get a prompt to install it. After that you will have it on your Home-screen, when started it covers whole screen and it should even work when you are offline. Very native like behavior, only thing is that it is not installed from the store. Sadly I don't have an iPhone so I was not able to test it on Apple device but I've read that even Safari partially supports PWA technology so in theory it should work.
Find all posts by this user
Quote this message in a reply
11-08-2020, 06:50 PM
Post: #9
RE: RPNcalc+ free colorful web calculator
(11-06-2020 11:27 AM)EdS2 Wrote:  I like it! I was surprised, though, when I left and re-entered SHIFT mode, to find INV was sticky.

I've fixed the issue. You need to start it once, wait for bit (10sec) for it to upgrade in the background (I should somehow inform user of a new version in the future). After that you can close the app and run it again and you will get the new version. This is because app is cached so that in theory you are able to use it offline.
Find all posts by this user
Quote this message in a reply
11-08-2020, 08:50 PM
Post: #10
RE: RPNcalc+ free colorful web calculator
Hello!

(11-08-2020 06:38 PM)radulle Wrote:  Was this what you had on mind? I see how this could be useful even without loops and conditionals.

Yes, exactly! I see no need to edit the operators, just the values.

(11-07-2020 01:23 PM)Maximilian Hohmann Wrote:  Sadly I don't have an iPhone so I was not able to test it on Apple device but I've read that even Safari partially supports PWA technology so in theory it should work.

I happen to have an iPhone from my employer (and and Android phone for my private use). Just tried to save the link to your calculator on the home screen and it seems to work fine, even without an internet connenction. So it looks as there really isn't a need to make a dedicated iOS app.

Regards
Max
Find all posts by this user
Quote this message in a reply
11-08-2020, 10:01 PM
Post: #11
RE: RPNcalc+ free colorful web calculator
Here is some me feedback from using it on two different iPhone models and IOS versions. On my iPhone 8 running IOS 12.1.2, it looks and works great in Safari and Chrome. On my iPhone SE running IOS 10.0.1, the keys are not in the right place. It looks like the following.

   
Find all posts by this user
Quote this message in a reply
11-08-2020, 11:34 PM
Post: #12
RE: RPNcalc+ free colorful web calculator
I certainly looks 'fun' and has enough functionality without being too intimidating for a 'junior' user

However decimal math would be nice !

48.0
^
47.8
-
0.2
-
should be 0.0

MikE T.

Mike T.

HP21, HP25, HP32E, HP33C, HP34C, HP10C, HP11C, HP12C, HP32S, HP22S
Find all posts by this user
Quote this message in a reply
11-09-2020, 02:28 AM
Post: #13
RE: RPNcalc+ free colorful web calculator
(11-08-2020 11:34 PM)Mike T. Wrote:  I certainly looks 'fun' and has enough functionality without being too intimidating for a 'junior' user

However decimal math would be nice !

48.0
^
47.8
-
0.2
-
should be 0.0

MikE T.
Well I don't know, Mike. 2.83106871279415e-15 is pretty close to zero. Certainly a lot more accurate than a slide rule, well if you used a slide rule for subtraction that isSmile
Find all posts by this user
Quote this message in a reply
11-10-2020, 10:53 AM
Post: #14
RE: RPNcalc+ free colorful web calculator
(11-08-2020 10:01 PM)Steve Simpkin Wrote:  Here is some me feedback from using it on two different iPhone models and IOS versions. On my iPhone 8 running IOS 12.1.2, it looks and works great in Safari and Chrome. On my iPhone SE running IOS 10.0.1, the keys are not in the right place. It looks like the following.

The issue seems to be very old version of Safari that is probably lower than 10.1 where they started supporting GRID which styling of keyboard uses nor does it support Service Workers which were implemented in Safari 11.1 and are required for web apps to work offline.

(11-08-2020 11:34 PM)Mike T. Wrote:  48.0
^
47.8
-
0.2
-
should be 0.0
(11-09-2020 02:28 AM)Steve Simpkin Wrote:  Well I don't know, Mike. 2.83106871279415e-15 is pretty close to zero. Certainly a lot more accurate than a slide rule, well if you used a slide rule for subtraction that isSmile

I used basic JS number type which is double precision floating point number IEEE 754 and JS Math object. I'm not really sure how best to handle this without introducing some other issues. I might better implement some JS library that handles it if there are too many edge cases. BTW: How did you come to this test?
Find all posts by this user
Quote this message in a reply
11-10-2020, 03:26 PM
Post: #15
RE: RPNcalc+ free colorful web calculator
Hi
The text font looks great, but I would like to see an alternative pixel font (retro version)

[Image: hp82240b7.jpg]

mechanical binary calculator https://www.youtube.com/watch?v=NQX6irk11qA
Find all posts by this user
Quote this message in a reply
11-11-2020, 08:58 AM (This post was last modified: 11-11-2020 09:06 AM by EdS2.)
Post: #16
RE: RPNcalc+ free colorful web calculator
(11-10-2020 10:53 AM)radulle Wrote:  I used basic JS number type which is double precision floating point number IEEE 754 and JS Math object. I'm not really sure how best to handle this without introducing some other issues. I might better implement some JS library that handles it if there are too many edge cases. BTW: How did you come to this test?
I suspect it will be rather tricky to make a binary calculator comply with decimal expectations. There are relatively few calculators which use binary, which for me is a valid implementation choice, but there will be oddities which some people will regard as bugs. The same kinds of things happen in decimal, but people tend to expect those errors. It's a perennial problem.

As double precision gives about 16 decimal digits, you could perhaps round to and display only 12 or 14. But you will have to deal with catastrophic cancellation somehow: when subtraction gives a result much smaller than the inputs, you will in effect need to round much more dramatically.

It would be good if there were a JS library to do this. Perhaps see here.
Find all posts by this user
Quote this message in a reply
11-11-2020, 12:56 PM
Post: #17
RE: RPNcalc+ free colorful web calculator
(11-11-2020 08:58 AM)EdS2 Wrote:  It would be good if there were a JS library to do this.

Is there no JS library for decimal math?

Disclaimer: I am not a Java or JS programmer.
Find all posts by this user
Quote this message in a reply
11-11-2020, 09:40 PM (This post was last modified: 11-11-2020 09:58 PM by radulle.)
Post: #18
RE: RPNcalc+ free colorful web calculator
(11-11-2020 12:56 PM)John Keith Wrote:  Is there no JS library for decimal math?
(11-11-2020 08:58 AM)EdS2 Wrote:  It would be good if there were a JS library to do this. Perhaps see here.

Thank you. This decimal.js library seems fine and I will have to take more look into it. It is a bit big, like 30kb but if it solves all edge cases and does not introduce any new issues it might be worth it.
Find all posts by this user
Quote this message in a reply
11-21-2020, 07:53 PM (This post was last modified: 11-21-2020 08:42 PM by radulle.)
Post: #19
RE: RPNcalc+ free colorful web calculator
(11-08-2020 11:34 PM)Mike T. Wrote:  However decimal math would be nice !

Implemented decimal math using decimal.js library. It gets auto-updated after you wait a bit and than close and reopen the app.
Find all posts by this user
Quote this message in a reply
11-22-2020, 08:20 AM
Post: #20
RE: RPNcalc+ free colorful web calculator
Thanks! I did a control-refresh. Notably, the stack contents were re-evaluated according to the history, or something, because the binary residues of (4/3-1)*3-1 changed to decimal residues. From -2.22044604925031e-16 to -1e-19
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)