Case of extrema failure is handled together with case of no solutions found.
Local variable Vsuiv is initialized by zero to avoid compiler warning.
sup = M_PI;
}
Standard_Boolean CS=0;
sup = M_PI;
}
Standard_Boolean CS=0;
- Standard_Real Vprec=0,Vsuiv;
+ Standard_Real Vprec = 0., Vsuiv = 0.;
//Creation of the polynom
CSLib_NormalPolyDef Poly(Order,Ratio);
//Find zeros of SAPS
//Creation of the polynom
CSLib_NormalPolyDef Poly(Order,Ratio);
//Find zeros of SAPS
Precision::Confusion(),
Precision::Confusion());
//If there are zeros
Precision::Confusion(),
Precision::Confusion());
//If there are zeros
- if(FindRoots.IsDone())
- {
- if(FindRoots.NbSolutions()>0)
+ if (FindRoots.IsDone() && FindRoots.NbSolutions() > 0)
{
//ranking by increasing order of roots of SAPS in Sol0
{
//ranking by increasing order of roots of SAPS in Sol0
{
//SAPS has no root, so forcedly do not change the sign
CS=Standard_False;
Poly.Value(inf,Vsuiv);
}
{
//SAPS has no root, so forcedly do not change the sign
CS=Standard_False;
Poly.Value(inf,Vsuiv);
}
- //fin if(MFR.NbSolutions()>0)
- }//fin if(MFR>IsDone())
+ //fin if(MFR.IsDone() && MFR.NbSolutions()>0)
+
if(CS)
//Polynom changes the sign
SP=0;
if(CS)
//Polynom changes the sign
SP=0;