Back to Calculator 

IMPORTANT NOTE: AlpMcalc is a rules based calculator. This means that it uses no internal math methods for the core processes. The calculations are based solely on math rules and code logic. While a lot of testing has been done it is possible to encounter certain problems with results. For the most current release,with bug fixes, visit the download site below. It can also be used as a tool for code logic flow and, obviously, a good mathematical tool. One last comment is that the speed is constantly being improved but this type of calculator can never be as fast as one that uses code dependant math libraries.

About

I created AlpMcalc as a challenge. I've done a ton of JS coding over the years but I found myself basically just building on and modifying other code. Someone told me there have only been a few lines of raw code ever written and all else just builds on that existing code. So I wanted to write a program that had never been written that also had a purpose and use. I searched for calculators that did not use numbers and couldn't find any so I wrote one. A lot folks asked WHY? and I get a lot of blank stares when I describe it and the amount of code it took but- oh well.

It is an alpha matrix calculator (AlpMcalc) which means it uses an alpha code rhythm I wrote to calculate solutions to math problems instead of numbers. This means it uses no numbers in the core calculations and therefore no JS math functions. There is probably a lot of clean up and smoothing that can be done with the code (processes) but the last time I cleaned it up I spent a long time correcting problems it caused.

Below is one of the matrixes the calculator uses. If the numbers entered are 23 + 46. The numbers are turned into letters cd and eg. Then the matrix is called at intersection ce=6 and dg=9. the answer is 69. Its actually a little more complex expecially in the division calculations but all primary functions uses matrixes like below.

A

B

C

D

E

F

G

H

I

J

A

0

1

2

3

4

5

6

7

8

9

B

1

2

3

4

5

6

7

8

9

0

C

2

3

4

5

6

7

8

9

0

1

D

3

4

5

6

7

8

9

0

1

2

E

4

5

6

7

8

9

0

1

2

3

F

5

6

7

8

9

0

1

2

3

4

G

6

7

8

9

0

1

2

3

4

5

H

7

8

9

0

1

2

3

4

5

6

I

8

9

0

1

2

3

4

5

6

7

J

9

0

1

2

3

4

5

6

7

8

The actual matrixes are made up of all alpha characters and I use a conversion routine to turn back into number characters before the solution is displayed. I don’t use exponents in the solution so the the calculator can return extremely long numbers depending on browser memory. Currently the calculator can do simple calculations like adding, subtracting, division, and multiplying. It can do calculations on fractions, decimals, or whole numbers and any combination. I have added some functions like POWERS, GCD, LCD, LCM, DR,SQR, and some quick division tests. I also use a lot of math rules and math logic to shortcut the processes.

History:

The first version was built in 2004 and worked with only whole numbers. On division it would return the remainder.

Version 2 -(10-10-05) 

added negative integer capability,

corrected some division issues,

added some math division test functions,

added an entry backup key,

added a clear key,

fixed the clear everything key to clear all input fields except memory,

and did a general tune-up to speed the processes- especially division.

I updated the interface for new keys and to load faster.

Created help file.

Added GCD function (Greatest Common Denominator between two numbers)

and fixed a bug were a zero was added to solution when the backwards div was looking at a single digit remainder and it was less then the stripped down number being divided and both were only one digit, this only was happening in rare cases.

Update 11-7-05.Was still adding a zero to solution in rare cases. I made another adjustment to correct that seems to have fixed it. This was happening when the solution was reached before the code completed a full itineration. I corrected by having it check that we were still looking at a complete divisor before we added the zero for digit jump in backward dividing. Just as a note here -a backward division goes something like this:
50990/944
First we add zeros to the divisor without going over the number we are dividing. In this case:
50990/9440
We then divide and keep the remainder while remembering the product. In this case 5. We then back down the added zero on the divisor and divide again to a product of 4 that we add to the 5 we got earlier to get 54. Since the remainder at this point is 14 (less then the divisor) we stop and have an answer to 50990/944 of 54 with a remainder of 14.

If the problem were 680997/54 we would start with 680997/540000 and use the same process. The code has to look for digit jumps that means the product contains one or more jumps from one to tens, or tens to hundreds, etc.... An example would be:

98592/96

We would use 98592/96000. That product is 1 with a remainder of 2592. If we back down on the divisor we have 2592/9600 so we know we jumped a digit place and add a zero to the product and back down the divisor again. Now our product is 10 and the new remaining problem is 2592/960. that product is 2, which we add to the 10 we remembered so now we have 102 and a new problem of 672/96, which is 7. So we add that to the product and get 1027. Since there was no remainder we stop and we have a solution to 98592/96 of 1027 with no remainder. This may seem a little out there but because I'm using no numbers in the actual calculations and functions it makes the process quicker on long calculations of like a hundred or more digits divided by small divisors.
Hope that helps.

/2006 - Created smaller version to fit on screens at lower resolutions and screen sizes.Fixed math div test on 6. Miss-named VAR and VAR value change in call to second function fixed. Added fraction mode so fractions and mixed numbers could be calculated, added LCD (Lowest Common Divisor), and LCM (Lowest Common Multiple),


Version 3 -(2-14-06)

added fraction mode, which allows the entering of fractions and mixed numbers in math calculations. The calculator gives the user the choice to present solution in "simple fraction" form by using the new LCD mode/function.

Added LCD mode/function, which allows computing of Lowest Common Divisor of two numbers or the lower of one number(the lowest number that any given number can be divided by - except 1 unless that is the only divisor). In the case of GCD if you enter the same number twice it will always be that number. It needs to be this way because of its use by the other functions (this would be the correct answer). I plan to add another function, which will allow a solution for getting a highest divisor for one number other than itself. The methods are already in place I just have to find room for the button.

I also added an LCM (Lowest Common Multiple of two numbers)function.

I did some more general tuning and re-arranged some of the keys and also added a trip link for the LCD mode. I also combined the js files for the change size option. This allowed both html files (small size or large size) to use the same js files.

Added some user error protection in the entering of problems.

Removed the add largest number first from all the functions that still had it.
The calculator now has 9 functions - Division, Times, Subtraction, Addition, Digital Root, Powers, LCD, GCD, and LCM, and 9 test functions for a total of 18 functions.

AlpMcalc still uses my own coded math methods and no numbers in the actual calculations. No JS math methods are used in the calculator.

/20/06 Fixed memory to accept fractions. Added more info to this help file. Fixed POW function to work with fractions, still need to look at improving speed a little here.

2/23/06 Did some housekeeping with the JS files. I'm at 3500 lines of code.

/22/06 -
Changed Alpmcalc over to CSS. I was having a few issues with the images so I decided to just do away with them. So we no longer need the smaller size as the css version will work on all resolutions from 800 on up. It's a little tight on 640 but still ok. No images will be included in future zip versions.

/28/-06 - Added decimal mode. The default is 5 digits to the right.
I also corrected some major issues that were a result of my trimming the code.

/2/-06 - Added decimalmode use of the powers and memory functions.
I also corrected some issues with decimalmode. Also added some more user error protection.I will be testing this release and fixing any issues I discover as I go.

/28/06 - Corrected an issue with the memory function that wasn't working with standard numbers. This broke when I added the function ability for adding and subtracting decimals and fractions in memory. It worked for those but would not for standard numbers. Now it works for all number types. It will not accept decimals if a fraction is in memory and vice-versa. I'm working on a conversion process that will allow decimal and fraction interaction in all the calculator functions.


/30/06 - Corrected a decimal issue in times mode. I need to keep looking at decimal issues.


/8/06 - Corrected issues with ?/P function. Added an advanced check to look at entered prime. If number is not prime it will complain. This check is not the best check for prime but it uses a rhythm to decide if number is possibly a prime instead of checking a list. This works great for the first few million or so of primes but it needs further checking to see how high the test will go and remain accurate. This was put in as a test for prime and speed was a concern so I only allowed the code to go so far. If you want to test this on really large numbers and you are familiar with code: in divtests.js change the line maxtry=1000 to maxtry=?????? -what ever number you are comfortable with. Large values will cause your system to run slow. Just kill the process if you need to. You can set your browser to not complain about the process just email me.

/31/06 - Corrected a decimal issue and sharpen the lcd feature. Now the lcd will go to the sq root. If a 1 or the number you entered is returned there is no lcd other then 1 or the number. Entering the same prime twice on lcd may take a long time but in principal will verify if it is prime. I also added another check to the ?/p function that will try to guess if the p is prime. This not real accurate but is a good guess.

Version 4 - (8-10-2010) This project has lay dormant for a while. I decided to go ahead and do some improvements I had intended to do. I added the ability to to enter mixed fractions and decimal problems. This was actually just a matter of reformatting before presenting the problem to the core processes.

I also took out the decimal and standard mode option and now the calculator stays in decimal mode unless it is doing a fraction or simple adding or subtracting whole number problems and it switches auto to correct mode. In doing mixed fractions and decimals the last number format entered before hitting the equals will be the format of the solution.

10/2011 Version 4.5- I corrected some formatting issues that affected some functions and certain neg calculations. These were all formatting issues that included the decimal placement on some calculations. I also tightened some of the calculations and changed some standards. For instance the lcm was not including the number used if it was the lcm and instead went to the next highest ie. 4 and 16 returned 64 and not 16 which is standard so I changed to the standard.GCD and LCD are also now standard.

11/2011 Version 5 - Added a sqr root function. This turned out to be a challenge but the finished product works fairly fast and uses no math methods just the matrixes and logic. For now only whole or decimal numbers no fraction.

added an input field for whole numbers only.

Reworked the powers function.

Cleaned up some issues that occurred rarely because of formatting.

Corrected a bug on div- going back to backwards division I added earlier.

I took out the fraction and decimal on powers. May add this back but for now powers only accepts whole numbers

11/29/11 fixed issue in div with backwards div where i was missing a check on on integer size after a same number match in comparing which is the higher number

12/4/11 fixed more issues with size checks, fixed issues with lcd and ?/p functions. Took out maxtry so if LCD is on it will just continue until it finds the lcd, it will use sq root as it’s limit and after initial checks will skip composite numbers. By the the time it does this composite will have been exhausted anyways.

12/5/11 fixed some issues with the ?/p test function.

Presently working on a factoring routine.

At this time all functions seem to be working properly but if I uncover a problem I'll correct it and keep the copy on my site updated.


Please report bugs to email address below.

http://www.www.memphiswebprogramming.com/contact


This program is copyright protected 2005 and contains methods that are the intellectual property of the author. Feel free to use and distribute as long as program is not altered in any way and copyright statement is included. For commercial use please contact author.