Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29249 Обсуждение

Issue with exp for double precision complex numbers with ifort and ifx

DmitryKopelevich
Начинающий
5 796Просмотр.

I'm using

ifort  2021.10.0 20230609
and

ifx 2023.2.0 20230721

I've ran into the following issue: Programs compiled with ifort and ifx incorrectly compute exponentials of double-precision complex numbers and return Infinity or 0 instead of the actual value. Below is a simple test code:

program test
        double complex :: x = (0.d0, 0.d0)
        print *, exp(x)
end program test

If I compile this code with ifort, the output is

(Infinity,0.000000000000000E+000)

If I compile the code with ifx, the output is different, but is still wrong:

 (0.000000000000000E+000,0.000000000000000E+000)

The issue appears to only arise with double precision complex numbers; the results are correct for single precision complex, double precision real etc.

Is this a known issue with these compilers?

0 баллов
1 Решение
Ron_Green
Модератор
5 190Просмотр.

For the Intel compilers, let's turn off our libimf and libsvml.  Use this option

 

-no-intel-lib=libimf,libsvml

 

 

Просмотреть решение в исходном сообщении

21 Ответы
Barbara_P_Intel
Сотрудник
347Просмотр.

The wrong answers with cexp is fixed in both ifx and ifort in the release that was published this week. Please give it a try!

 

 

Ответить