Free42 with IEEE 7542008 decimal floatingpoint  interested in a sneak preview?

03182014, 03:23 PM
Post: #92




RE: Free42 with IEEE 7542008 decimal floatingpoint  interested in a sneak preview?
(03182014 07:16 AM)Werner Wrote: On a real 42S, LOG(9.99999999999) = 1, exactly. Meaning it is the closest number to the exact result. The same holds for any precision. On Free42 Decimal34, LOG(1e341) is 34 and LOG(1e331) is 33, exactly, and that's what the result should be. Good point. I don't want to return incorrect results just for the convenience of a flawed algorithm! OK, I'll fix LOG like this: use the bid128_ilogb and bid128_scalbn functions to pull out the exponent and normalize the mantissa to the range [1, 10), then use bid128_log10 on the normalized mantissa, and finally add the exponent to the result. That will return exact results for powers of ten, without introducing numerical inconsistencies. 

« Next Oldest  Next Newest »

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