Post Reply 
Free42 possible accuracy flaw
03-23-2022, 08:49 AM
Post: #11
RE: Free42 possible accuracy flaw
(03-23-2022 08:05 AM)Thomas Okken Wrote:  Estimate for exactness: take the number of significant digits, that is, the mantissa length minus the number of trailing zeroes, and multiply that by the exponent; if <= 34, use squaring?
That doesn't work for single-digits eg 8^35. And even 11^32 < 1e34
Quote:The estimate doesn't have to be sharp: multiply the mantissa by such a power of 10 that you get the smallest possible integer, then perform the repeated-squaring algorithm, and if the result is < 10^35, fix the exponent and return it, and otherwise, let bid128_pow() do its thing.
Yes, even if you then do some superfluous work. But better that than accuracy loss ;-)
Doesn't the lib have an exact flag, like in the 71B? As long as the result is exact, keep on squaring. Once it isn't, go back and do the normal e^(x*LN(y))
Werner

41CV†,42S,48GX,49G,DM42,DM41X,17BII,15CE,DM15L,12C,16CE
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Free42 possible accuracy flaw - Werner - 03-23-2022, 07:30 AM
RE: Free42 possible accuracy flaw - Werner - 03-23-2022 08:49 AM
RE: Free42 possible accuracy flaw - Werner - 03-25-2022, 07:03 AM
RE: Free42 possible accuracy flaw - Werner - 03-30-2022, 08:04 AM
RE: Free42 possible accuracy flaw - Werner - 03-25-2022, 08:53 AM



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