public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/107753] New: gfortran returns NaN in complex divisions (x+x*I)/(x+x*I) and (x+x*I)/(x-x*I)
@ 2022-11-18 19:32 weslley.pereira at ucdenver dot edu
  2022-11-18 19:50 ` [Bug fortran/107753] " anlauf at gcc dot gnu.org
                   ` (14 more replies)
  0 siblings, 15 replies; 16+ messages in thread
From: weslley.pereira at ucdenver dot edu @ 2022-11-18 19:32 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107753

            Bug ID: 107753
           Summary: gfortran returns NaN in complex divisions
                    (x+x*I)/(x+x*I) and (x+x*I)/(x-x*I)
           Product: gcc
           Version: 12.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: weslley.pereira at ucdenver dot edu
  Target Milestone: ---

If `x=huge(0.0d0)` or `x=2.0d0**(dble(maxexponent(0.0d0))-1)`, the GNU Fortran
12.2.0 returns a NaN for the complex divisions `(x+x*I)/(x+x*I)` and
`(x+x*I)/(x-x*I)`. We verified this after running compiler tests for the new
LAPACK 3.11.0 release. All other divisions with `x=2**m`, for for
`MINEXPONENT-1 <= m < MAXEXPONENT` return the expected results:
`(x+x*I)/(x+x*I)=1` and `(x+x*I)/(x-x*I)=I`.

Related links:
How to reproduce this issue: https://godbolt.org/z/b3WKWodvn
Open issue in LAPACK: https://github.com/Reference-LAPACK/lapack/issues/757
Tests added to LAPACK: https://github.com/Reference-LAPACK/lapack/pull/623

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2022-12-07 22:31 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-18 19:32 [Bug fortran/107753] New: gfortran returns NaN in complex divisions (x+x*I)/(x+x*I) and (x+x*I)/(x-x*I) weslley.pereira at ucdenver dot edu
2022-11-18 19:50 ` [Bug fortran/107753] " anlauf at gcc dot gnu.org
2022-11-18 20:50 ` kargl at gcc dot gnu.org
2022-11-18 21:26 ` anlauf at gcc dot gnu.org
2022-11-18 22:05 ` kargl at gcc dot gnu.org
2022-11-18 23:24 ` sgk at troutmask dot apl.washington.edu
2022-11-18 23:32 ` sgk at troutmask dot apl.washington.edu
2022-11-18 23:45 ` weslley.pereira at ucdenver dot edu
2022-11-18 23:47 ` weslley.pereira at ucdenver dot edu
2022-11-19  0:25 ` sgk at troutmask dot apl.washington.edu
2022-11-19 19:11 ` kargl at gcc dot gnu.org
2022-11-19 20:14 ` anlauf at gcc dot gnu.org
2022-11-20  0:54 ` sgk at troutmask dot apl.washington.edu
2022-12-07 21:16 ` anlauf at gcc dot gnu.org
2022-12-07 21:50 ` kargl at gcc dot gnu.org
2022-12-07 22:31 ` anlauf at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).