[Bug math/31426] New: log10( 10^n ) poor accuracy in bin80 datatype, log10l( 1E+07l ) -> 7.000000000000000000434...

newbie-02 at gmx dot de sourceware-bugzilla@sourceware.org
Wed Feb 28 11:32:09 GMT 2024


https://sourceware.org/bugzilla/show_bug.cgi?id=31426

            Bug ID: 31426
           Summary: log10( 10^n ) poor accuracy in bin80 datatype, log10l(
                    1E+07l ) -> 7.000000000000000000434...
           Product: glibc
           Version: unspecified
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: math
          Assignee: unassigned at sourceware dot org
          Reporter: newbie-02 at gmx dot de
  Target Milestone: ---

Created attachment 15381
  --> https://sourceware.org/bugzilla/attachment.cgi?id=15381&action=edit
Snippet demonstrating log10l imprecision.

hello @all,  

quite sure you'll tell me it's not a bug but the 'feature of imprecision' in
bin-FP-math :-( 

log10l( 1E+07l ) produces 7.000000000000000000434..., while 
logl( 1E+07l ) / logl( 10.0l ) would hold with 7.0, 

Same as with pow10s, having them exact at integral powers of ten 
would help to form a reliable grid of stable points, and 
find better ways for correct rounding, which 
would help for better math. 

Thus if possible to improve without messing other points I'd 
appreciate, if not I'd like some explanation why and which 
calculation path is taken / preferred, and a code pointer to 
have a look myself. 

'Me bad' is always an option, tried to evaluate and present 
with best intention and skills available. 

If 'notabug' pls. leave open or unconfirmed as hook for others 
who at some time in the future might have a good idea.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Glibc-bugs mailing list