Bug 111220
Summary: | exp function from math lib returns wrong values | ||
---|---|---|---|
Product: | [Retired] Red Hat Linux | Reporter: | Edward Pilipczuk <edward.pilipczuk> |
Component: | glibc | Assignee: | Jakub Jelinek <jakub> |
Status: | CLOSED NOTABUG | QA Contact: | Brian Brock <bbrock> |
Severity: | high | Docs Contact: | |
Priority: | medium | ||
Version: | 9 | CC: | fweimer |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | i686 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2003-11-30 13:30:37 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
Edward Pilipczuk
2003-11-30 12:29:31 UTC
This is a bug in the example. Functions without prototypes are assumed to return int. exp returns double, not int, so this really cannot work correctly, especially on architectures which return floating point values in different registers than integral ones. If you add #include <math.h> to the example, it will work just fine. |