Test Calculator

Hello,
I ask to help me with testing, I spend several hours on this app and even though I think everything works as it should I’m sure as always I’m missing somethings, but before I move to styling I would like to fix all the possible bugs… if you got few minutes please just check it out and let me know if something doesn’t works as it should.

Here is a link

It looks good (although I might add a bit of color.)

The only issues I found are:

  • How does it handle entering large numbers? Right now they scroll off the “screen”.
  • What does the % key do? It seems to just clear the entry most of the time.

But still, good job.

1 Like

In my test the % button didnt seem to work as either modulus or percent, but it did some sort of function (and only sometimes).

Subtracting a number leading to only a decimal left over results in a long inaccurate decimal(eg 51.1 -51=0.10000000000000142) because of javascripts decimal weirdness.

Other than that I didnt notice anything unusual.
good luck

1 Like

very nice … works good … couple of things … you can put in lots of 0 at start eg 000001 so you could change that so if 0 pressed it dosent do anything.
if i press 5* and then decide i wanted to add not multiply i press cancel and it removes multiply sign on bottom line but keeps it on top … i then press + and number 3 and = it gives me 3 instead of 8
numbers overflow off the calculator if you put in enough of them
0.1+0.2 = 0.30000000000000004 … this is the way computers do this so its not an error but you could limit number of digits after decimal to only show 0.30 Also think this was part of the specs for calculator its tricky though as for 0.001+0.0002 you want to show 0.0012
depending how rigid you want to be its up to you if you want to tackle that …
other than that works very well and looks good

1 Like

JohnL3 @JashuHB @ksjazzguitar thanks for your replays, I at last had some free time and I believe I fixed all the issues you mentioned, those where really interesting and I probably would never thought of testing some of those cases. Also about percentage I did it according to this description - https://blogs.msdn.microsoft.com/oldnewthing/20080110-00/?p=23853

Well done! But the % button is not working properly. Everything else is working. Good luck!

1 Like

Thanks… it works according to this explanation though -

Or am I missing something? can you tell me what exactly doesn’t works?

Good job! But what about operations with negative numbers? For example 5 * (-3). It should be -15, but what I get is 2 because it gets rid of the multiplication operator and ends up subtracting 3 from 5.

1 Like

OK, I guess I misunderstood the % key on a calculator - I never used it before. I guess it works fine.

Damn and here I thought I was done with it. Thanks for pointing it out.