Fix input error with DEL key

I fix an error that occurred when performing the following steps:

1. Enter ".3"
2. Press "DEL" ("3" is deleted)
3. Press "DEL" ("." is deleted)
4. Enter "5"
5. Now "05" is displayed.

I fix it so only "5" is displayed.
Bugfix #2

I fix bug #2 (Fix rounding errors).  The way to prevent this error in
JavaScript is by converting the calculation result to a string with a
given precision, then to parse it as float, and, at last, to convert it
to a string again.