public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug math/31426] New: log10( 10^n ) poor accuracy in bin80 datatype, log10l( 1E+07l ) -> 7.000000000000000000434...
@ 2024-02-28 11:32 newbie-02 at gmx dot de
2024-02-28 11:49 ` [Bug math/31426] " schwab@linux-m68k.org
2024-02-28 12:49 ` newbie-02 at gmx dot de
0 siblings, 2 replies; 3+ messages in thread
From: newbie-02 at gmx dot de @ 2024-02-28 11:32 UTC (permalink / raw)
To: glibc-bugs
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.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug math/31426] log10( 10^n ) poor accuracy in bin80 datatype, log10l( 1E+07l ) -> 7.000000000000000000434...
2024-02-28 11:32 [Bug math/31426] New: log10( 10^n ) poor accuracy in bin80 datatype, log10l( 1E+07l ) -> 7.000000000000000000434 newbie-02 at gmx dot de
@ 2024-02-28 11:49 ` schwab@linux-m68k.org
2024-02-28 12:49 ` newbie-02 at gmx dot de
1 sibling, 0 replies; 3+ messages in thread
From: schwab@linux-m68k.org @ 2024-02-28 11:49 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=31426
--- Comment #1 from Andreas Schwab <schwab@linux-m68k.org> ---
7.000000000000000000434 is still within 1 ULP.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug math/31426] log10( 10^n ) poor accuracy in bin80 datatype, log10l( 1E+07l ) -> 7.000000000000000000434...
2024-02-28 11:32 [Bug math/31426] New: log10( 10^n ) poor accuracy in bin80 datatype, log10l( 1E+07l ) -> 7.000000000000000000434 newbie-02 at gmx dot de
2024-02-28 11:49 ` [Bug math/31426] " schwab@linux-m68k.org
@ 2024-02-28 12:49 ` newbie-02 at gmx dot de
1 sibling, 0 replies; 3+ messages in thread
From: newbie-02 at gmx dot de @ 2024-02-28 12:49 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=31426
--- Comment #2 from b. <newbie-02 at gmx dot de> ---
@Andreas Schwab:
thanks for the hint, it's 1 ULP off!
add. observations:
for 4933 positive integral powers of ten
log10l has 1 ULP devia in 1730 cases,
logl( 10^n ) / logl( 10 ) has 1 ULP devia in 486 cases,
for 4950 negative integral powers of ten
log10l has 1 ULP devia in 1745 cases,
logl( 10^n ) / logl( 10 ) has 1 ULP devia in 501 cases,
all these devias can be neutralized with simple recheck
calculations, if! integral powers of ten are exact. #28474.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-02-28 12:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-28 11:32 [Bug math/31426] New: log10( 10^n ) poor accuracy in bin80 datatype, log10l( 1E+07l ) -> 7.000000000000000000434 newbie-02 at gmx dot de
2024-02-28 11:49 ` [Bug math/31426] " schwab@linux-m68k.org
2024-02-28 12:49 ` newbie-02 at gmx dot de
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).