Problem with complex float functions on Linux/C++ V8.1

Problem with complex float functions on Linux/C++ V8.1

The simple code: (put "float" in brackets for the template instantiation below. The bulletin board software "helpfully" removes what it thinks is bad html)

#include
int main() {
std::complex float a = log(std::complex float (3.0f,0.0f));
}

gives the compilation error

$ icc simple.cc
/tmp/icclE1hwc.o(.text+0x78): In function `main':
: undefined reference to `__builtin_logf'
$

Similar problems occur when using exp. It grabs these functions from /usr/include/g++/cmath. Compiling with -cxxlib-icc avoids the problem. Changing "float" to "double" allows it to work with the default --cxxlib-gcc.

Just thought the people at Intel would like to know (assuming you didn't already).

1 contenuto / 0 nuovi
Per informazioni complete sulle ottimizzazioni del compilatore, consultare l'Avviso sull'ottimizzazione