[Bug libc/22142] New: printf oupts a wrong value of DBL_MAX on ppc64 and ppc64le
tuliom at linux dot vnet.ibm.com
sourceware-bugzilla@sourceware.org
Fri Sep 15 13:07:00 GMT 2017
https://sourceware.org/bugzilla/show_bug.cgi?id=22142
Bug ID: 22142
Summary: printf oupts a wrong value of DBL_MAX on ppc64 and
ppc64le
Product: glibc
Version: 2.26
Status: NEW
Severity: normal
Priority: P2
Component: libc
Assignee: unassigned at sourceware dot org
Reporter: tuliom at linux dot vnet.ibm.com
CC: drepper.fsp at gmail dot com
Target Milestone: ---
Using the following program:
#include <stdio.h>
#include <float.h>
int main() {
printf("double max = %.8f \n", DBL_MAX);
printf("double max = %a \n", DBL_MAX);
return 0;
}
Outputs:
double max =
179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948050016458515597071187135716751514538302097059854097235942464302912735919891897.11953999
double max = 0x1.fffffffffffffp+1023
Instead of:
double max =
179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.00000000
double max = 0x1.fffffffffffffp+1023
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Glibc-bugs
mailing list