Acron RPN announces v3.0 BETA

08272017, 05:49 PM
Post: #1




Acron RPN announces v3.0 BETA
Today we’re pushing out the first public BETA of Acron RPN Calculator v3.0 for Android. Highlights for this release:
Want to be a BETA tester? Join here. 

08272017, 09:20 PM
(This post was last modified: 06082018 10:53 PM by vanLudwig.)
Post: #2




RE: Acron RPN announces v3.0 BETA
UI layouts can be authored in XML, saved with the .acronrpn file extension, and loaded exactly like a saved stack .acronrpn file. Only the paid version of Acron RPN can change layouts. Here’s some useful downloads to get started:
A few things to remember:


08302017, 12:16 AM
(This post was last modified: 10062017 02:19 AM by vanLudwig.)
Post: #3




RE: Acron RPN announces v3.0 BETA
I just pushed an update of BETA 1 to the Play Store. There was an overaggressive try/catch block that was preventing users from getting properly notified of bugs in their layouts. It should be much easier to write a layout now that you aren't doing it blindfolded.
Here's a variant of the stock layout that adds 28 memory registers (az + theta and phi). Enjoy. Download 

08302017, 11:20 PM
Post: #4




RE: Acron RPN announces v3.0 BETA
Here's my first attempt (layout file attached; remove the ".txt" extension before use). It adds an extra row of keys above the numbers to give access to some of the new functions. The added keys are:
The other functions work in a similar way, with the stack arguments being function, variable ("x" here, since I haven't put any others on the keyboard), and then one (zero, deriv) or two (integ, sigma) numerical values. These functions (and others) are described in the "Layout Documentation" linked to earlier in this thread. I have many "classic" calculator apps on my phone and I enjoy using them all, but none of them are as convenient to use as AcronRPN when doing longer calculations. If you haven't seen it yet you really should give it a go. If RPN has a future, this is it! Nigel (UK) 

08312017, 01:09 PM
(This post was last modified: 08312017 01:25 PM by vanLudwig.)
Post: #5




RE: Acron RPN announces v3.0 BETA
Bravo  I hadn't expected anyone to figure out those solver methods until I wrote a tutorial. Glad to see that the weekend I spent writing that layout documentation wasn't for naught.
In case you hadn't noticed, the solver methods play nice together so that you don't have to keep reentering the equation. For instance, immediately after finding the zero of tan(x)sqrt(x) is 0.6949, you can press deriv to learn that the slope at 0.6949 is 1.095. Acron RPN will see the zero() on the top of the stack and assume those are the parameters you want for the deriv function. You also might want to make room for the MathWhere function  it can be really handy too. For instance


08312017, 08:02 PM
Post: #6




RE: Acron RPN announces v3.0 BETA
Here's a layout that includes the "where" function. As before, remove the ".txt" suffix from the attached file before running it on your Android phone / tablet. (If the phone pops up a menu, choose "open file" and then select AcronRPN as the application to open the file with.) This layout includes a row with six buttons, but to me it looks fine! I've added borders to the buttons and I've changed the "Change sign" key label from "()" to a more traditional "CHS".
The XML layout system works well. At first it looks completely incomprehensible but the documentation (and Notepad++ as an editor) allow simple changes without too much difficulty. It's not what I would call straightforward but I haven't had to invest days to get some decent results. Thank you again for an excellent product with superb support. Nigel (UK) 

08312017, 11:46 PM
(This post was last modified: 10062017 02:21 AM by vanLudwig.)
Post: #7




RE: Acron RPN announces v3.0 BETA
Here's a pretty decent replica of an HP32SII. It obviously isn't programmable, and there's a few other buttons I had to change or repurpose, but it gives you a good idea of what's possible through layouts.
Download 

09012017, 02:36 PM
Post: #8




RE: Acron RPN announces v3.0 BETA
(08312017 11:46 PM)vanLudwig Wrote: Here's a pretty decent replica of an HP32SII. It obviously isn't programmable, and there's a few other buttons I had to change or repurpose, but it gives you a good idea of what's possible through layouts. I tried it, it's nice.. but how can I load other skins? I didn't found any button to load.. I also delete the file but didn't work... any ideas? 

09012017, 02:51 PM
Post: #9




RE: Acron RPN announces v3.0 BETA
From my earlier post


09012017, 09:38 PM
(This post was last modified: 10062017 02:22 AM by vanLudwig.)
Post: #10




RE: Acron RPN announces v3.0 BETA
Here's the last layout I have laying around (though I'll probably make more in the future). It pretty much looks like the stock layout, but there's an extra page of buttons in the x! toolbar, and A LOT of toolbar buttons can be longpressed for second functions. Look for the shaded upperright corner of toolbar buttons to indicate they can be longpressed. Almost all of the fixed buttons can be longpressed too, so I decided not to shade those. I realize this is a bit overwhelming to use  I mainly designed it just so that I could test all the built in functionality.
factor > Return the xth prime number mod > PI(x) i.e. the number of primes less than or equal to x gcd > Euler Phi function round > rationalize(y, x) iPart > ceiling(x) fPart > floor(x) x > sign(x) x^2 > x^3 sqrt(x) > cbrt(x) 1/x > x^1 C(y, x) > multichoose(y, x) delta% > %T x!! > !x (double factorial and subfactorial) Σx > maximum x Σx^2 > minimum x mean x > median x population standard dev > sample standard dev 7 > Toolbar of scientific constants 8 > Toolbar of unit conversions. Longpress unit conversion button for reverse conversion 4 > Toolbar of calculus / solver functions 5 > Toolbar of TVM financial functions. Tap variables to assign them; longpress to solve for them Download 

09042017, 06:29 PM
Post: #11




RE: Acron RPN announces v3.0 BETA
I kinda glossed over the TVM financial toolbar in my last post, but I think it deserves a closer look. If you read though the reference documentation, you might have noticed that Acron RPN doesn't have any finical functions. So, how does this work?
There's an article in the October 1977 edition of HewlettPackard Journal on the math behind their financial calculators. Basically, they have an equation of five variables (n, I, PV, FV, and PMT). You fill in four values and solve for the fifth such that the whole expression equals zero. Conveniently, Acron RPN already has MathZero for doing exactly that. If you look in the behavior section of ultimate.acronrpn, you can find that when you press the toolbar button to solve for one of those variables, it invokes a sequence of keypresses that create the generic TVM function on the stack, use MathZero to solve for the variable you want, stores the result of MathZero back into that variable, then deletes the TVM equation it authored. It isn't foolproof, but it is pretty impressive what you can create in your layout xml without changing the actual sourcecode. Behavior for solving for FV (other variables are nearly identical): Code:


09052017, 08:03 PM
Post: #12




RE: Acron RPN announces v3.0 BETA
Here's another layout. It doesn't do anything particularly impressive but I've put the functions I use most often as long presses on number and operator keys (as you've done) and I've put labels on the keys to show this. The lower (and smaller) function label on a key is invoked by a long press.
(As with the previous layouts, remove the ".txt" extension before use.) One slight issue  integrals appear to have a precision of around 1 part in 10^4 which is less than I'd expect, given the computing power available on a phone! Could this be tweaked in some way? Nigel (UK) 

09052017, 11:18 PM
(This post was last modified: 09052017 11:26 PM by vanLudwig.)
Post: #13




RE: Acron RPN announces v3.0 BETA
Cool  I like the twotoned button effect.
Do you have an example integral calculation you are having trouble with? I'm using a 10,000 iteration Riemann sum, which seems like it should be sufficient. 

09062017, 09:41 AM
Post: #14




RE: Acron RPN announces v3.0 BETA
For example:
$$\int_0^1 x^2\,{\rm d}x=0.33328\dots$$ rather than 0.333333; $$\int_1^{10}{1\over x}\,{\rm d}x=2.30299\dots$$ rather than 2.30258. Errors generally appear in the 4th or 5th significant figure. Nigel (UK) 

09062017, 09:45 PM
(This post was last modified: 09062017 11:12 PM by vanLudwig.)
Post: #15




RE: Acron RPN announces v3.0 BETA
I'm pretty sure I remember my numeric algorithms professor saying that doing a trapezoidal Riemann sum wasn't worth the added cost over rectangular  you were better off spending the extra time doing additional iterations. Not sure whether I misremember that, or if he was just wrong, but when I sat down and really thought about it, I was able to switch my algorithm to use trapezoids with almost no cost. That improved the precision by 35 decimal places
0.333283335000000 > 0.333333335000000 2.302990159819040 > 2.302585159819040 Then I changed from 10,000 iterations to 25,000 iterations. That improved the x^2 by two digits; it only improved the 1/x by half a digit. 0.333333335000000 > 0.333333333600000 2.302585159819040 > 2.302585103686040 That seems like a good improvement, and even with 25,000 iterations, I don't notice any slow down. I'm currently looking at releasing BETA 2 this weekend  these changes will be in it. Thanks for the great suggestion. On a side note, how did you insert math equations in a forum post? That is really cool. 

09072017, 06:51 AM
Post: #16




RE: Acron RPN announces v3.0 BETA
(09062017 09:45 PM)vanLudwig Wrote: Then I changed from 10,000 iterations to 25,000 iterations. That improved the x^2 by two digits; it only improved the 1/x by half a digit. Instead of thousands and tenthousands of function calls, why don't you just implement a decent integration algorithm like the Romberg method? It is iterative, i.e. you only have to do as many function calls as required for a given precision, and it does not evaluate the function at the integration limits which is another advantage. (09062017 09:45 PM)vanLudwig Wrote: On a side note, how did you insert math equations in a forum post? That is really cool. This forum supports Mathjax. Dieter 

09072017, 10:34 AM
Post: #17




RE: Acron RPN announces v3.0 BETA
I'm with Dieter, pick a better algorithm. For example, a two point Gaussian quadrature is exact for cubic polynomials which includes the x^{2} example. Romberg is an easy choice and is adaptive. Also interesting are the Gauss–Kronrod quadratures, although they will need to be made adaptive.
As for trapezoidal vs rectangular, it depends how you define the latter. Using the function value at the middle of the rectangles for the height (rather than at the left or right edge) produces an error term twice that of the trapezoidal for one less function evaluation. Using either edge to define the rectangles is worse. Wikipedia illustrates this okay. Computationally, they are about the same (but trapezoidal requires one more function evaluation). Pauli 

09072017, 06:29 PM
Post: #18




RE: Acron RPN announces v3.0 BETA
(09072017 10:34 AM)Paul Dale Wrote: Romberg is an easy choice and is adaptive. "Adaptive" – that's what I meant when I said it was "iterative". #) (09072017 10:34 AM)Paul Dale Wrote: As for trapezoidal vs rectangular, ... Let's not forget that the Romberg method is based on the Trapezoidal rule. It just does a clever extrapolation based on a quite good error estimate. ;) FWIW, I think something like the Trapezoidal method or even the much better Simpson rule really should not get implemented in a current calculator. That's like calculating trig and log functions with just five significant digits. My first calculator back in 1977 did so, but some things have changed since then. ;) Dieter 

09072017, 07:59 PM
Post: #19




RE: Acron RPN announces v3.0 BETA
(09062017 09:45 PM)vanLudwig Wrote: 0.333283335000000 > 0.333333335000000 So that's 25 000 iterations giving roughly 8–9 correct digits. For the record: a standard Romberg implementation like the one in the WP34s requires merely 61 function calls for the x² integral or 511 calls for 1/x to return results with full 16digit accuracy. You really should switch to a better method. And virtually anything is better than rectangular or trapezoid. Dieter 

09072017, 08:55 PM
Post: #20




RE: Acron RPN announces v3.0 BETA
(09062017 09:45 PM)vanLudwig Wrote: On a side note, how did you insert math equations in a forum post? That is really cool. This thread shows how it can be done. If you want to see how the equations in each post were produced, press the "quote" button to see what the poster actually typed. It's basically \(\TeX\). I do think that switching to an adaptive algorithm for integration would be a good idea. It's not just that it requires fewer evaluations; it allows you to be confident that the desired degree of accuracy has been reached. I'm looking forward to the next version! Nigel (UK) 

« Next Oldest  Next Newest »

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