All pastes #2056151 Raw Edit

Anonymous

public text v1 · immutable
#2056151 ·published 2011-05-10 11:28 UTC
rendered paste body
if(ui->Drob->isChecked()==1)
    {
        double x1,x2,xn,h=0.1,mod;
                x1=point.x();
                double tochka=x1;
                xk[0]=x1;
                yk[0]=FF.Parser(str,x1);
                x2=x1+h;
                mod=x2-x1;
                while(mod>0.001)
                {
                                if( FF.Parser(str,x2)<FF.Parser(str,x1))
                                {
                                    h=(-1)*h/2;
                                }
                        x1=x2;
                        x2=x2+h;
                        mod=fabs(x2-x1);
                }
                double tmpx1=x2;
                h=0.1;
                x1=point.x();
                x2=x1+h;
                mod=x2-x1;
                while(mod>0.001)
                {
                                if( FF.Parser(str,x2)>FF.Parser(str,x1))
                                {
                                    h=(-1)*h/2;
                                }
                        x1=x2;
                        x2=x2+h;
                        mod=fabs(x2-x1);
                }
                double tmpx2=x2;