Bug 801
Summary: | *printf with precision >= 16 gives bogus additional digits | ||
---|---|---|---|
Product: | [Retired] Red Hat Linux | Reporter: | Christoph Rohland <cr> |
Component: | glibc | Assignee: | Cristian Gafton <gafton> |
Status: | CLOSED NOTABUG | QA Contact: | |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 5.2 | ||
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 1999-01-18 22:04:34 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Christoph Rohland
1999-01-12 18:21:26 UTC
I have verified this to be true. I compiled and ran the sample of code on a test lab machine and got the same results. It will be assigned to a developer. The double number are guaranteed up to 15 precission digits. After that pretty much nothing is guaranteed or specialized math libs have to be used. This is what pretty much standards require off the double precission implementation. That's only have of the truth... I do not want to have more digits, but if I give a precision > 16 it should fill up with zeros and not print some other bogus numbers. One can not blame libm for trying to approximate to its best a double number out of range. The standards define the behavior as "unspecified" in this case, so what it happens is perfectly within the limits of the standards. O.K. I will state at last, that I am not confident with the answer but do not want to hassle any more. Porting to RedHat Linux makes this more difficult. Also I could not find the stated standards restriction in 'ISO/IEC 9899 : 1990 Programming Languages - C' |