- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear all
I noticed a bug of division with quadruple precision complex.
A version of compiler is 18.0.2.199. And the compiler option is nothing.
Following is the sample program.
program main implicit none complex(16) alpha real(16) beta, gamma alpha = cmplx(huge(gamma), huge(gamma), 16) beta = huge(gamma) gamma = 1.0Q+1 write(*, *) alpha, beta, gamma write(*, *) alpha/gamma, beta/gamma end program main
Following is an execution result.
(1.189731495357231765085759326628007E+4932, 1.189731495357231765085759326628007E+4932)
1.189731495357231765085759326628007E+4932 10.0000000000000000000000000000000
(Infinity,Infinity) 1.189731495357231765085759326628007E+4931
The result of dividing complex was "infinity".
If the number to be divided is far from huge() value, the result was collect.
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Works with gfortran, ifort reproduces your output. Might be a bug.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page