View | Details | Raw Unified | Return to issue 124091
Collapse All | Expand All

(-)sccomp/source/solver/solver.cxx (-5 / +5 lines)
Lines 370-380 Link Here
370
            double fCoeff   = aCellsIter->second.back();       // last appended: coefficient for this variable
370
            double fCoeff   = aCellsIter->second.back();       // last appended: coefficient for this variable
371
            double fTwo     = lcl_GetValue( mxDoc, aCellsIter->first );
371
            double fTwo     = lcl_GetValue( mxDoc, aCellsIter->first );
372
372
373
            bool bLinear = rtl::math::approxEqual( fTwo, fInitial + 2.0 * fCoeff ) ||
373
            if(!rtl::math::approxEqual( fTwo, fInitial + 2.0 * fCoeff ))
374
                           rtl::math::approxEqual( fInitial, fTwo - 2.0 * fCoeff );
374
	    	maStatus = lcl_GetResourceString( RID_ERROR_NONLINEAR );
375
            // second comparison is needed in case fTwo is zero
375
            // This comparison is needed in case fTwo is zero
376
            if ( !bLinear )
376
//	    if(!rtl::math::approxEqual( fInitial, fTwo - 2.0 * fCoeff ));
377
                maStatus = lcl_GetResourceString( RID_ERROR_NONLINEAR );
377
//            	maStatus = lcl_GetResourceString( RID_ERROR_EPSILONLEVEL );
378
        }
378
        }
379
379
380
        lcl_SetValue( mxDoc, *aVarIter, 0.0 );      // set back to zero for examining next variable
380
        lcl_SetValue( mxDoc, *aVarIter, 0.0 );      // set back to zero for examining next variable

Return to issue 124091