lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Thanks Hartmut for the HP-15C test. 
It seems HP-15C does *decimal* math, 10 significant digits, half-round-up

s = (a + b + c) / 2
= (1e5 + 99999.99979 + 0.00029) / 2
= (199999.9998 + 0.00029) / 2   -- round up
= 200000.0001 / 2                         -- round up again
= 100000.0001                               -- half-round-up

I have never seen a calculator like this ...
With this, I match your area result of 17.60681685 exactly.

On Jun 12, 2018, at 5:38 PM, Hartmut Henkel <hartmut_henkel@gmx.de> wrote:

On Tue, 12 Jun 2018, Albert Chan wrote:

BTW, the article stated that heron formula return area = 17.6
I cannot reproduce it (even adjusting precision with gmpy2)

Anyone still have the old HP-15C calculator ?

yes :-) Keys still without bouncing, bright LCD, that's quality.

FWIW, my HP-15C tells 17.60681685 using the first formula in §1 on the
3rd example in Table 1, just tried. Else i have not followed the thread.

The 17.6 error comes from s: When it's 100000.000039999998989515
(Lua), Delta is 9.999999809638328685. But the HP-15C shows
 s=100000.0001, then it's 17.6068..., which you can confirm wit Lua.

 Best Regards, Hartmut