What do you think about my calculator?

What do you think about my calculator?
0.0 0

#1

tldr; http://codepen.io/amine_bens/full/rLbEGo/

i ‘finished’ my calculator challenge, i try to focus a lot on the design aspect to make my projects as appealing as i possibly can/know, would love to hear any suggestions or improvements i could try to add to it.

thank you campers :slight_smile:


#2

Nice and simple design :thumbsup:
Maybe you can increase the font size a bit?

The number spill out of its box when there are too many digits.
The decimal point button stops working after clicking it once (try clicking it, then deleting it, then clicking it again; or click AC after clicking it). It only starts to work again after I made a calculation.


#3

increase font: done.
decimal point : fixed ( i guess, would love if you could check it again ).
numbers spilling out: trying to come up wit a fix :stuck_out_tongue:

thank you :slight_smile:


#4

I can now type a decimal point after clicking AC, but I still can’t type it back after deleting it.


#5

fixed that aswell :smiley: thank you


#6

0.2*0.1=0.020000000000000004


#7

that is weird :o i couldn’t know what causes the issue, and i have no ide how to fix it :confused:


#8

Even the sample calculator produces the same result :slight_smile:

If I’m correct, 0.2 and 0.1 are not stored in memory exactly as 0.2 and 0.1, but rather as approximations to these numbers, because there’s no way to perfectly represent these numbers in binary. So you’re actually multiplying numbers that are not quite 0.2 and 0.1.

I checked out @BenGitter’s calculator and I wonder how that shows exactly 0.02 :thinking:


#9

thanks for clarifying the issue :slight_smile: i’ll try to update my work with a solution the soonest possible


#10

You can do this:
Math.round(answer*1000000)/1000000

This gives you 6 decimals. (Will only show if needed)


#11

Hi!
When you have the result of a calculation, and type a number, this number is added to the result. I think it should start a brand new calculation.
If you type 1000000000000000000000000000000000, numbers get out of the display. What I did is just have a digits limit. I was too lazy to implement scientific notation :wink: