The Little Array That Could

Edit: This software is now open-source.

Intro

Hello everyone, and welcome to my new blog! It couldn’t be a more opportune time than the middle of the summer to start up a new programming site! I would like to start off by saying that I am very excited to share some of my great experiences I’ve had in the few years that I’ve been programming, and start some interesting discussions with other bloggers! Now, this being my first post, I would also like to advise you to sit tight for this, because you’re in for a wild ride!

The Making of PowArray

Let me backtrack a bit and pick up just before from where I ended off on my about me page. So at the peak of last year’s fateful summer, I was at my desktop computer, frantically coding away at my keyboard in the blistering heat, determined to solve Project Euler #16 without any Big Integer class, without any external libraries and certainly without a calculator. All I had was my PC, my keyboard, my mouse, Eclipse, and of course the standard Java 8 API. But I was going to minimize my use of the Math library, and restrict myself to arrays, ArrayLists, variables and good old fashioned loops. The rest, of course, involved arithmetic operations between those variables.

It took me at least a week of coding, debugging and yelling at my monitor to get it all together and working. But in the end, I was quite satisfied with my success, and didn’t regret a single bit that I wasn’t out playing floor hockey with my friends or going to parties. Of course I still maintained my fitness by going to the gym and biking, and hung out with my friends. However after solving PE #16, I wasn’t going to stop there, as I had shortly realized after that I was half a step away from extending my binary based calculator to any arbitrary base n.

My summer was coming to an end back then, so I decided to pick up the project again this past Winter during my vacation. I was in for another tough challenge, as I now had to reconstruct a multiplication algorithm for bases involving any x number of digits. I was able to do so and get it working, but this involved me instantiating ArrayLists of ArrayLists of Integers, which became pretty hard to keep track of.

I then solved a cavalcade of problems (of which I will have the pleasure of sharing my solutions) and went on to tackle PE #20, which was to find the sum of the digits in 100!. I instantly wore a smug grin on my face, because I already had 3/4 of the problem done. I just had to tweak my solution to PE #16, and it would be a piece of cake. Unfortunately it wasn’t so easy, and I’ll get into the details more closely in a future post.  However, when I did solve the problem I realized what I had at this point was Java desktop application potential. I thought at the time I just needed to throw in an extra useful feature or two, and it would make a cool app. So that’s one of the major projects I’ve been working on this summer, and now I can get to the meat of the article.

PowArray: Features and Functionality

I’ve finished developing my first official release of this app (v1.0.1), complete with a host of user friendly features such as output save preferences, sound, volume control, and pause/resume and stop buttons in addition to the core features: prime factorization of large integers (up to 2⁶³-1), exponentiation of arbitrary base n (up to base and exponent 2³¹-1)  and factorials up to 265000!. Also, you’ll be happy to note that I’ve kept some awesome goodies from my PE solutions as well such as sum of digits, number of trailing zeroes and number of digits. The good thing is, I’ve cross checked some very large calculations going into millions of digits with Wolfram Alpha, and it seems that the app can handle pretty much anything thrown at it. I’ve dubbed this software creation PowArray Arbitrary Precision Calculator, and it is currently downloadable as a Java executable file (.jar). It should run on most major platforms including Windows, Mac OS and Linux, but unfortunately I’ve only had the liberty of testing it thoroughly on my own Windows 8 machine. Also make sure you have the latest version of Java installed, which currently is Java 8. If you would like to download the app and have a go at it, you can download it at the bottom of the page. For now, I leave you with these screenshots and a video demonstration of the app:

PowArray Official Logo

PowArray Official Logo

Screenshot Array


Download the App Here

Advertisements

4 thoughts on “The Little Array That Could

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s