RPNcalc+ free colorful web calculator
11-22-2020, 02:46 PM
Post: #22
 radulle Junior Member Posts: 14 Joined: Nov 2020
RE: RPNcalc+ free colorful web calculator
(11-22-2020 01:40 PM)Albert Chan Wrote:
(11-21-2020 07:53 PM)radulle Wrote:  Implemented decimal math using decimal.js library.

Nice work. But decimal type may need some work.

https://rpncalcplus.web.app/ issues:
1. "PI 1e15 *" gives error "maximumFractionDigits value is out of range"
2. LN not working, "100 LN" gives 2, same as "100 LOG"
3. 10^X not working. "100 10^X" give 10, then "LOG" crashed: "[DecimalError] Invalid argument: 10^x"
4. Infinity ≠ Infinity. "1E99 X^2" gives Infinity, taken "LOG" gives back 99*2 = 198
5. "10 E LOGxy STO" (≡ LN(10) ≈ 2.302585092994), then "RCL", calculator freezed.
(unable to enter new numbers).

The upside is we have *huge* expoenent range. (note: we avoid using the bad 10^X)
"2.302585092994e15 E^X LOG "﻿ ﻿ ﻿ ﻿ ﻿ ﻿ → 999,999,999,999,980

Decimal type have 20 digits mantissa, 15 digits exponents.

Albert Chan & EdS2, thank you very much, I went with a presumption that JS Math's methods worked in the same way as Decimal's which is not the case (e.g. LN vs LOG), I will definitely have to explore this new library more and iron all the issues.

Due to current calculator like design I limited exponent to two digits, do you find use of a very large exponent?
 « Next Oldest | Next Newest »