Qucs / qucsator

Circuit simulator of the Qucs project
http://qucs.sourceforge.net
GNU General Public License v2.0
24 stars 12 forks source link

Fix fmod recursion #12

Open guitorri opened 7 years ago

guitorri commented 7 years ago
git/qucs/qucs-core/src/math/real.cpp:256:36: warning: all paths through this function will call itself [-Winfinite-recursion]
nr_double_t fmod( nr_double_t arg) {

Remove the qucs::fmod ? Use std::fmod direclty?

in3otd commented 7 years ago

um, it seems that since some time we use std::fmod() anyway; didn't see where else it's used.

BTW, checking for HAVE_STD_TRUNC in the fmod() routines seems weird :grin:

guitorri commented 7 years ago

In fact, I think the only place fmod is used is below: ./src/evaluate.cpp:974: _RETD (std::fmod (d1, d2));

Guess who is to blame for most of those tests? :smile: