# What do you think about my calculator?

**URL:** <https://forum.freecodecamp.org/t/what-do-you-think-about-my-calculator/36688>\
**Category:** I Built This\
**Created:** [September 14, 2016, 11:42am UTC](https://forum.freecodecamp.org/t/what-do-you-think-about-my-calculator/36688 "2016-09-14T11:42:45Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![amine-benselim](https://avatars.discourse-cdn.com/v4/letter/a/90ced4/32.png) [@amine-benselim](https://forum.freecodecamp.org/u/amine-benselim)\
**Post date:** [September 14, 2016, 11:42am UTC](https://forum.freecodecamp.org/t/what-do-you-think-about-my-calculator/36688/1 "2016-09-14T11:42:45Z")

</div>

tldr; [http://codepen.io/amine\_bens/full/rLbEGo/](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 🙂

---

<div class="post-metadata">

**Author:** ![kevcomedia](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/kevcomedia/32/125737_2.png) [@kevcomedia](https://forum.freecodecamp.org/u/kevcomedia)\
**Post date:** [September 14, 2016, 11:50am UTC](https://forum.freecodecamp.org/t/what-do-you-think-about-my-calculator/36688/2 "2016-09-14T11:50:35Z")

</div>

Nice and simple design 👍  
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.

---

<div class="post-metadata">

**Author:** ![amine-benselim](https://avatars.discourse-cdn.com/v4/letter/a/90ced4/32.png) [@amine-benselim](https://forum.freecodecamp.org/u/amine-benselim)\
**Post date:** [September 14, 2016, 12:13pm UTC](https://forum.freecodecamp.org/t/what-do-you-think-about-my-calculator/36688/3 "2016-09-14T12:13:02Z")

</div>

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 😛

thank you 🙂

---

<div class="post-metadata">

**Author:** ![kevcomedia](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/kevcomedia/32/125737_2.png) [@kevcomedia](https://forum.freecodecamp.org/u/kevcomedia)\
**Post date:** [September 14, 2016, 12:14pm UTC](https://forum.freecodecamp.org/t/what-do-you-think-about-my-calculator/36688/4 "2016-09-14T12:14:48Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![amine-benselim](https://avatars.discourse-cdn.com/v4/letter/a/90ced4/32.png) [@amine-benselim](https://forum.freecodecamp.org/u/amine-benselim)\
**Post date:** [September 14, 2016, 12:25pm UTC](https://forum.freecodecamp.org/t/what-do-you-think-about-my-calculator/36688/5 "2016-09-14T12:25:26Z")

</div>

fixed that aswell 😃 thank you

---

<div class="post-metadata">

**Author:** ![BenGitter](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/bengitter/32/12192_2.png) [@BenGitter](https://forum.freecodecamp.org/u/BenGitter)\
**Post date:** [September 14, 2016, 12:46pm UTC](https://forum.freecodecamp.org/t/what-do-you-think-about-my-calculator/36688/6 "2016-09-14T12:46:32Z")

</div>

0.2\*0.1=0.020000000000000004

---

<div class="post-metadata">

**Author:** ![amine-benselim](https://avatars.discourse-cdn.com/v4/letter/a/90ced4/32.png) [@amine-benselim](https://forum.freecodecamp.org/u/amine-benselim)\
**Post date:** [September 14, 2016, 12:53pm UTC](https://forum.freecodecamp.org/t/what-do-you-think-about-my-calculator/36688/7 "2016-09-14T12:53:08Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![kevcomedia](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/kevcomedia/32/125737_2.png) [@kevcomedia](https://forum.freecodecamp.org/u/kevcomedia)\
**Post date:** [September 14, 2016, 1:10pm UTC](https://forum.freecodecamp.org/t/what-do-you-think-about-my-calculator/36688/8 "2016-09-14T13:10:28Z")

</div>

Even the sample calculator produces the same result 🙂

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` 🤔

---

<div class="post-metadata">

**Author:** ![amine-benselim](https://avatars.discourse-cdn.com/v4/letter/a/90ced4/32.png) [@amine-benselim](https://forum.freecodecamp.org/u/amine-benselim)\
**Post date:** [September 14, 2016, 1:30pm UTC](https://forum.freecodecamp.org/t/what-do-you-think-about-my-calculator/36688/9 "2016-09-14T13:30:17Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![BenGitter](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/bengitter/32/12192_2.png) [@BenGitter](https://forum.freecodecamp.org/u/BenGitter)\
**Post date:** [September 14, 2016, 2:34pm UTC](https://forum.freecodecamp.org/t/what-do-you-think-about-my-calculator/36688/10 "2016-09-14T14:34:53Z")

</div>

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

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

---

<div class="post-metadata">

**Author:** ![mi-mina](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/mi-mina/32/20546_2.png) [@mi-mina](https://forum.freecodecamp.org/u/mi-mina)\
**Post date:** [October 4, 2016, 4:24pm UTC](https://forum.freecodecamp.org/t/what-do-you-think-about-my-calculator/36688/11 "2016-10-04T16:24:58Z")

</div>

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 😉

---

<div class="post-metadata">

**Author:** ![ILM](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ilm/32/363239_2.png) [@ILM](https://forum.freecodecamp.org/u/ILM)\
**Post date:** [June 1, 2021, 6:06pm UTC](https://forum.freecodecamp.org/t/what-do-you-think-about-my-calculator/36688/12 "2021-06-01T18:06:10Z")

</div>

Closed on June 1, 2021, 6:06pm UTC


