Quantcast
Channel: Intel® Software - Intel® C++ Compiler
Viewing all articles
Browse latest Browse all 1175

intel's valarray operator-() acts in reverse, opposite results with g++ and icpc

$
0
0

Hi, something seems not right with the functioning of in intel's valarray implementation. I tried using both the previous compilers as well as the most recent 2017 version of icpc. For instance, when we compile with icpc, we find that 0.1 - 0.05 = -0.05, instead of 0.1-0.05 = 0.05. g++ works fine though. Please find attached an example C++ file, and the makefile. Note that the makefile has a .txt extension that needs to be removed, or copy paste its contents in the terminal.

AttachmentSize
Downloadtext/x-c++srcsimple.cpp462 bytes
Downloadtext/plainmakefile.txt208 bytes

Viewing all articles
Browse latest Browse all 1175

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>