Bug 175913
Summary: | Wrong calculation result with complex SQRT in gfortran | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Alexander Täschner <taschna> |
Component: | gcc | Assignee: | Jakub Jelinek <jakub> |
Status: | CLOSED NOTABUG | QA Contact: | |
Severity: | high | Docs Contact: | |
Priority: | medium | ||
Version: | 4 | ||
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | i386 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2005-12-16 13:44:28 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
Alexander Täschner
2005-12-16 08:01:42 UTC
The result is certainly the same as with Intel Fortran 9.0 (as well as the same thing rewritten into C). The reason is that: Z1**2 is (4.0d0,0.0d0), but -Z1**2 is (-4.0d0,-0.0d0). And while SQRT((-4.0d0,0.0d0)) is really (0.0d0,2.0d0), SQRT((-4.0d0,-0.0d0)) is (0.0d0,-2.0d0). This is a changed behaviour compared to g77 (3.4.4 20050721 (Red Hat 3.4.4-2)). On Windows the Compaq Visual Fortran 6 gives also the result (0,2). Therefore I am not sure whether it is a bug or not. I came across the bug when testing to compile the CERNLIB. There the math test C208 failed because of the new behaviour. |