Commit f953513354635d2db32836649f19768deeea927c

Authored by Jürgen Knödlseder
1 parent d7ec0067

Reformulate test for OpenSolaris

Showing 1 changed file with 2 additions and 2 deletions
src/opt/GOptimizerPar.cpp
... ... @@ -426,7 +426,7 @@ void GOptimizerPar::factor_value(const double& value)
426 426 {
427 427 // If there is a minimum boundary and if value is below this boundary
428 428 // then throw an exception
429   - if (m_has_min && value < factor_min()) {
  429 + if (m_has_min && (value*m_scale < min())) {
430 430 std::string msg = "Specified value factor "+gammalib::str(value)+
431 431 " is smaller than the minimum boundary "+
432 432 gammalib::str(factor_min())+".";
... ... @@ -435,7 +435,7 @@ void GOptimizerPar::factor_value(const double&amp; value)
435 435  
436 436 // If there is a maximum boundary and if value is above this boundary
437 437 // then throw an exception
438   - if (m_has_max && value > factor_max()) {
  438 + if (m_has_max && (value*m_scale > max())) {
439 439 std::string msg = "Specified value factor "+gammalib::str(value)+
440 440 " is larger than the maximum boundary "+
441 441 gammalib::str(factor_max())+".";
... ...