This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug math/22243] New: log2(0) and log10(0) are wrong in downward rounding without the svid compat wrapper
- From: "nszabolcs at gmail dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Tue, 03 Oct 2017 16:03:13 +0000
- Subject: [Bug math/22243] New: log2(0) and log10(0) are wrong in downward rounding without the svid compat wrapper
- Auto-submitted: auto-generated
https://sourceware.org/bugzilla/show_bug.cgi?id=22243
Bug ID: 22243
Summary: log2(0) and log10(0) are wrong in downward rounding
without the svid compat wrapper
Product: glibc
Version: 2.27
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: math
Assignee: unassigned at sourceware dot org
Reporter: nszabolcs at gmail dot com
Target Milestone: ---
log2(0) and log10(0) return inf instead of -inf in downward rounding when the
svid wrapper is suppressed (static linking, new targets).
#include <math.h>
#include <stdio.h>
#include <fenv.h>
int main()
{
fesetround(FE_DOWNWARD);
double y1 = log2(0);
double y2 = log10(0);
fesetround(FE_TONEAREST);
printf("%a\n", y1);
printf("%a\n", y2);
}
prints
inf
inf
with static linking.
--
You are receiving this mail because:
You are on the CC list for the bug.