Post Reply 
Small challenge
04-24-2023, 01:07 PM
Post: #24
RE: Small challenge
(04-23-2023 11:10 AM)robve Wrote:  It is common to find exponentiation by squaring for integer powers, which tends to be more accurate than repeated multiplication and log*exp closed forms.

Unfortunately, this is true only if we don't cause intermediate rounding errors.

(03-22-2022 07:11 PM)Albert Chan Wrote:  When we keep squaring, the errors also blows up exponentially.

x = 1e8 = 0b101 111 101 011 110 000 100 000 000
b = 1+1/x

Free42 (internally only do squarings)
b^(2^08) = 1.000002560003264002763521747927282
b^(2^13) = 1.000081923355125194292436470243333
...
b^(2^26) = 1.956365933428064586618947538663749

All terms to multiply has errors on the *same* side; losing 7 digits precision is normal.

We had this discussion in Free42 possible accuracy flaw thread
Free42/Plus42 were updated to avoid above explosive error issues.

This is result of Plus42 1.0.14 (RHS now all exact)

b^(2^08) = 1.000002560003264002763521747927281
b^(2^13) = 1.000081923355125194292436470243294
b^(2^26) = 1.956365933428064586618947538036231

(03-24-2022 05:01 PM)Thomas Okken Wrote:  
(03-24-2022 04:53 PM)Albert Chan Wrote:  Can I assume new implementation is never worse than internal bid128_pow() ?

Yes: it only uses multiplications when the result of that calculation is exact, and bid128_pow() in all other cases.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Small challenge - J-F Garnier - 04-22-2023, 02:33 PM
RE: Small challenge - Valentin Albillo - 04-22-2023, 03:29 PM
RE: Small challenge - John Keith - 04-22-2023, 04:38 PM
RE: Small challenge - Massimo Gnerucci - 04-22-2023, 03:33 PM
RE: Small challenge - Valentin Albillo - 04-22-2023, 03:41 PM
RE: Small challenge - J-F Garnier - 04-22-2023, 03:41 PM
RE: Small challenge - Gerson W. Barbosa - 04-22-2023, 05:15 PM
RE: Small challenge - BruceH - 04-22-2023, 04:30 PM
RE: Small challenge - Gerson W. Barbosa - 04-22-2023, 05:29 PM
RE: Small challenge - Gerson W. Barbosa - 04-28-2023, 12:52 AM
RE: Small challenge - J-F Garnier - 04-28-2023, 07:13 AM
RE: Small challenge - J-F Garnier - 05-16-2023, 06:57 PM
RE: Small challenge - robve - 05-18-2023, 03:16 AM
RE: Small challenge - C.Ret - 04-22-2023, 06:30 PM
RE: Small challenge - Thomas Klemm - 04-22-2023, 07:24 PM
RE: Small challenge - J-F Garnier - 04-22-2023, 09:42 PM
RE: Small challenge - Guenter Schink - 04-25-2023, 09:56 PM
RE: Small challenge - John Keith - 04-25-2023, 11:46 PM
RE: Small challenge - Dave Britten - 04-27-2023, 02:30 PM
RE: Small challenge - Valentin Albillo - 04-23-2023, 12:58 AM
RE: Small challenge - C.Ret - 04-23-2023, 06:24 AM
RE: Small challenge - EdS2 - 04-23-2023, 08:00 AM
RE: Small challenge - robve - 04-23-2023, 11:10 AM
RE: Small challenge - robve - 04-23-2023, 01:01 PM
RE: Small challenge - robve - 04-23-2023, 01:56 PM
RE: Small challenge - EdS2 - 04-23-2023, 02:08 PM
RE: Small challenge - J-F Garnier - 04-23-2023, 02:13 PM
RE: Small challenge - John Keith - 04-23-2023, 06:41 PM
RE: Small challenge - J-F Garnier - 04-24-2023, 10:11 AM
RE: Small challenge - Albert Chan - 04-24-2023, 12:58 PM
RE: Small challenge - brouhaha - 04-24-2023, 05:32 PM
RE: Small challenge - Albert Chan - 04-24-2023 01:07 PM
RE: Small challenge - robve - 04-28-2023, 08:37 PM
RE: Small challenge - J-F Garnier - 04-24-2023, 01:35 PM
RE: Small challenge - John Keith - 04-24-2023, 06:54 PM
RE: Small challenge - Christoph Giesselink - 04-25-2023, 07:13 PM
RE: Small challenge - J-F Garnier - 04-25-2023, 08:49 PM
RE: Small challenge - J-F Garnier - 04-26-2023, 07:51 AM
RE: Small challenge - J-F Garnier - 04-27-2023, 07:31 PM
RE: Small challenge - EdS2 - 04-28-2023, 08:53 AM



User(s) browsing this thread: 1 Guest(s)