tmolteno / necpp

NEC2++ is a C++ rewrite of the Numerical Electromagnetics Code (NEC-2) with many new features like automatic error detection when you specify the structure incorrectly and much faster execution. Nec2++ can analyse radiating as well as scattering properties of structures. The simulation engine in Nec2++ is compiled into a library for easy integration into automatic antenna design systems or GUI tools. Examples are included for using Nec2++ from C/C++, Ruby and Python.

Home Page:http://elec.otago.ac.nz/w/index.php/Necpp

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

clang build does not permit use of abs() with a float-like argument

jeffsf opened this issue · comments

c_evlcom_tb.cpp:14:15: error: using integer absolute value function 'abs' when argument is of floating point type [-Werror,-Wabsolute-value]
     REQUIRE((abs(j0.real() -  j0r) < eps));
              ^
$ gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 7.0.2 (clang-700.1.81)
Target: x86_64-apple-darwin15.3.0
Thread model: posix

Easily resolved by using std::fabs()

I had to do this also with gcc-6.1.1 (Fedora 24) to make the software compile.

This has been fixed by recent commits. Thanks for the reports.