semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
int main(int argc, char* argv[])
{
	int n,i;
	scanf("%d\n",&n);
	for(i=1;i<=n;i++){
		double a,b,c,x1,x2;
		scanf("%lf %lf %lf",&a,&b,&c);
		double d=b*b-4*a*c;
		if(d>0){
			x1 = (-b + sqrt(b*b-4*a*c))/(2*a); 
		    x2 = (-b - sqrt(b*b-4*a*c))/(2*a);
			printf("x1=%.5lf;x2=%.5lf\n",x1,x2);}
		else if(d==0){
			x1=-b/(2*a);
			printf("x1=x2=%.5lf\n",x1);}
		else{
			if(b!=0){
			x1=-b/(2*a);
			x2=sqrt(4*a*c-b*b)/(2*a);
			printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",x1,x2,x1,x2);}
			else{
            x1=b/(2*a);
			x2=sqrt(4*a*c-b*b)/(2*a);
			printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",x1,x2,x1,x2);}
		}
	}


	return 0;
}
int main()
{
      float a,b,c,n,p,q,l;
      scanf("%f",&n);      
      float i=1;
      while (i<=n)
      {
            scanf ("%f %f %f\n",&a,&b,&c);
            l=b*b-4*a*c;
            if (b!=0) 
                  p=-b/(2*a);
            else
                  p=b/(2*a);

            if (l<0)
             {
               q=sqrt(-l)/(2*a);
               printf ("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",p,q,p,q);
               }
            else 
              {
                 q=sqrt(l)/(2*a);
                 if (p+q==p-q)
                    printf ("x1=x2=%.5f\n",p);
                  else
                    printf ("x1=%.5f;x2=%.5f\n",(p+q),(p-q));
                  }               
             i++;
           }
}
int main()
{
	int n,t;
	scanf("%d",&n);
	for(t=0;t<n;t++)
	{
		float a,b,c;
		double p,q,k,x1,x2;
		scanf("%f %f %f\n",&a,&b,&c);
		if(b*b-4*a*c<0)
		{
			k=sqrt(-b*b+4*a*c);
		    p=-b/(2*a);q=k/(2*a);
			printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",p,q,p,q);
		}
		else
		{
            k=sqrt(b*b-4*a*c);
            p=-b/(2*a);q=k/(2*a);
			x1=p+q;x2=p-q;
		    if(q==0.0)
				printf("x1=x2=%.5f\n",p);
			else
			    printf("x1=%.5f;x2=%.5f\n",x1,x2);
		}
	}
	return 0;
}
int main()
{
    int n,k;
	float a,b,c;
	double x1,x2,t,Re,Im;
	cin >> n;
	for (k = 1; k <= n; k++)
	{
		cin >> a >> b >> c;
		t = b * b - 4 * a * c;
		Re = -b / (2 * a);
		Im = sqrt(fabs(t)) / (2 * a);
		if (t > 0)
		{
			x1 = Re + Im;
			x2 = Re - Im;
			if (fabs(x1) <= 1e-5)
			{
				x1 = 0;
			}
			else if (fabs(x2) <= 1e-5)
			{
				x2 = 0;
			}
			cout << fixed << setprecision(5) << "x1=" << x1 << ";" << "x2=" << x2 << endl;
		}
		else if (t == 0)
		{
			if (fabs(Re) <= 1e-5)
			{
				x1 = 0;
			}
			else
			{
				x1 = Re;
			}
			cout << fixed << setprecision(5) << "x1=x2=" << x1 << endl;
		}
		else
		{
			if (fabs(Re) <= 1e-5)
			{
				Re = 0;
			}
			cout << fixed << setprecision(5) << "x1=" << Re << "+" << Im << "i;x2=" << Re << "-" << Im << "i" << endl;
		}
	}
	return 0;
}
int main()
{
	int n;
	double a, b, c, delta ;//delta ????
	double x1, x2, x1i, x2i ;//??x1i,x2i
	cin>>n;
	for( int i=1 ; i<=n ; i++ )
	{
		 cin>>a>>b>>c ;
		 delta=b*b-4*a*c ;
		 if( delta>0 )
		 {
			 x1 = ( -b + sqrt( delta ) ) / ( 2*a ) ;
	         x2 = ( -b - sqrt( delta ) ) / ( 2*a ) ;
		     cout << fixed << setprecision(5)
		    		 << "x1=" << ( ( abs( x1 )<10e-5 )? 0:x1) << ";"
		    		 << "x2=" << ( ( abs( x2 )<10e-5 )? 0:x2) <<'\n' ;
		 }
		 else if( delta==0 )//??delta=0 ?????
		 {
			 x1 = x2 = -b / ( 2*a ) ;
			 cout<< fixed << setprecision(5) << "x1=x2=" << ( ( abs ( x1 )<10e-5 )? 0:x1) <<endl ;
		 }
		 else//delta<0?????
		 {
			 x1 = -b / ( 2*a ) ;
			 x2 = -b / ( 2*a ) ;
			 x1i = sqrt( -delta ) / ( 2*a ) ;
			 x2i = sqrt( -delta ) / ( 2*a ) ;
		     cout<< fixed << setprecision(5)
		          << "x1="  << ( ( abs ( x1 )<10e-5 )? 0:x1) << "+" << x1i << "i" << ";"
		          << "x2=" <<  ( ( abs ( x1 )<10e-5 )? 0:x1) << "-" << x2i << "i" <<endl ;

		 }
	}
return 0;
}
int main()
{
    int n,m,k;
    double d,e,f;
    scanf("%d\n",&n);
    double a[n],b[n],c[n];
    for(m=0;m<n;m++)
    {
     scanf("%lf %lf %lf\n",&a[m],&b[m],&c[m]);
    }
    for(k=0;k<n;k++)
    { d=b[k]*b[k]-4*a[k]*c[k];
      if(d>0)
      {
       e=(-b[k]+sqrt(d))/(2*a[k]);
       f=(-b[k]-sqrt(d))/(2*a[k]);
        printf("x1=%.5lf;x2=%.5lf\n",e,f);
      }
      else if(d==0)
      {
        e=(-b[k])/(2*a[k]);
        printf("x1=x2=%.5lf\n",e);
      }
      else if(d<0)
      {
          e=(-b[k])/(2*a[k]);
          f=sqrt(-d)/(2*a[k]);
          if(b[k]==0)
          {printf("x1=0.00000+%.5lfi;x2=0.00000-%.5lfi\n",f,f);}
          else
          {printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",e,f,e,f);}
      }
    }
return 0;
}
int main()                                      //??? 
{                                               //????? 
    int n,i;
    double a,b,c,x1,x2,d,p,q;                   //???? 
    cin>>n;
    for(i=0;i<n;i++)                            //n??? 
    {                                           //???? 
          cin>>a>>b>>c;                         //?? a,b,c 
          d=b*b-4*a*c;         
          p=-b/(2*a);
          q=sqrt(abs(d));                       //????????? 
          if(d<0)                               //?  d<0 
          {                                    //?? d ? 0 ????? 
                cout<<fixed<<setprecision(5)<<"x1="<<p+1-1<<"+"<<q/(2*a)<<"i"
                    <<";"<<"x2="<<p+1-1<<"-"<<q/(2*a)<<"i"<<endl;
          }
          else                                  
          {
              if(d==0)                             //? d=0 
              {
                     cout<<fixed<<setprecision(5)<<"x1=x2="<<p+1-1<<endl;
              }          
              else                                  //? d>0 
              {
                  cout<<fixed<<setprecision(5)<<"x1="<<p+1-1+q/(2*a)<<";"<<"x2="<<p+1-1-q/(2*a)<<endl;
              }
          } 
    }     
     return 0;
}                                                   //?????
int main(int argc, char* argv[])
{int n,i;
double a,b,c,d,x1,x2;
scanf("%d",&n);
	  for(i=0;i<n;i++)
	  {scanf("%lf%lf%lf",&a,&b,&c);
	  d=-4*a*c+b*b;
	  if(d>0)
	  {x1=(-b+sqrt(d))/(2*a);
	  x2=(-b-sqrt(d))/(2*a);
	  printf("x1=%.5lf;x2=%.5lf\n",x1,x2);}
	  else if(d==0)
	  {x1=(-b+sqrt(d))/(2*a);
	  printf("x1=x2=%.5lf\n",x1);}
	  else
	  {printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",(-b)/(2*a),
	  sqrt(-d)/(2*a),(-b)/(2*a),sqrt(-d)/(2*a));}}
	return 0;
}
int main(int argc, char* argv[])
{
	int n,i;
	double a,b,c,x1,x2,delt,xr,xc;
	scanf("%d",&n);
	for(i=1;i<=n;i++)
	{
		scanf("%lf%lf%lf",&a,&b,&c);
		delt=b*b-4*a*c;
		if(delt>0)
		{
            x1 = (-b + sqrt(delt))/(2*a); 
            x2 = (-b - sqrt(delt))/(2*a); 
            printf("x1=%.5f;x2=%.5f\n",x1,x2);
		}
		else if(delt==0)
		{
            x1 = (-b + sqrt(delt))/(2*a); 
            x2 = (-b - sqrt(delt))/(2*a); 
			printf("x1=x2=%.5f\n",x1);
		}
		else
		{
            xr=-b/(2*a);
			xc=sqrt(-b*b+4*a*c)/(2*a);
            if(b!=0)
			{printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",xr,xc,xr,xc);}
			else
			{printf("x1=0.00000+%.5fi;x2=0.00000-%.5fi\n",xc,xc);}
		}
	}
	return 0;
}
int main()	
{
	double a[10000],b[10000],c[10000],d[10000][2];
	int i,j,n;
	cin>>n;
	for(i=1;i<=n;i++)
	{
		cin>>a[i]>>b[i]>>c[i];
		if(a[i]<0)
		{
			a[i]=-a[i],b[i]=-b[i],c[i]=-c[i];
			if(b[i]*b[i]-4*a[i]*c[i]>=0)
			{
				d[i][0]=(-b[i])/(2*a[i]);
				d[i][1]=(sqrt(b[i]*b[i]-4*a[i]*c[i]))/(2*a[i]);
			}
			if(b[i]*b[i]-4*a[i]*c[i]<0)
			{
				d[i][0]=(-b[i])/(2*a[i]);
				d[i][1]=(sqrt(-b[i]*b[i]+4*a[i]*c[i]))/(2*a[i]);
			}
		}
		if(a[i]>0)
		{
			if(b[i]*b[i]-4*a[i]*c[i]>=0)
			{
				d[i][0]=(-b[i])/(2*a[i]);
				d[i][1]=(sqrt(b[i]*b[i]-4*a[i]*c[i]))/(2*a[i]);
			}
			if(b[i]*b[i]-4*a[i]*c[i]<0)
			{
				d[i][0]=(-b[i])/(2*a[i]);
				d[i][1]=(sqrt(-b[i]*b[i]+4*a[i]*c[i]))/(2*a[i]);
			}
		}
	}
	for(j=1;j<=n;j++)
	{
		if(b[j]*b[j]-4*a[j]*c[j]>0)
			cout<<fixed<<setprecision(5)<<"x1="<<d[j][0]+d[j][1]<<";x2="<<d[j][0]-d[j][1]<<endl;
		if(b[j]*b[j]-4*a[j]*c[j]==0)
			cout<<fixed<<setprecision(5)<<"x1=x2="<<d[j][0]<<endl;
		if(b[j]*b[j]-4*a[j]*c[j]<0)
			cout<<fixed<<setprecision(5)<<"x1="<<d[j][0]<<"+"<<d[j][1]<<"i;x2="<<d[j][0]<<"-"<<d[j][1]<<"i"<<endl;
	}
	return 0;
}
int main()
{   
    int i,n;
    double a,b,c,x1,x2,y,z;
    scanf ("%d",&n);
    for (i=0;i<n;i++) 
 {
    scanf("%lf %lf %lf",&a,&b,&c);
    y=b*b-4*a*c;
    
        if (a==0)
        printf ("error\n");
        else
  {
            if (b==0)
            {   if (y>0)
                   {x1=(sqrt(b*b-4*a*c))/(2*a);
                    x2=(sqrt(b*b-4*a*c))/(2*a);
                    printf("x1=%.5f;x2=%.5f\n",x1,x2);}
                else
                 {if(y==0)
                     {x1=(sqrt(b*b-4*a*c))/(2*a);
                      x2=(sqrt(b*b-4*a*c))/(2*a);
                      printf("x1=x2=%.5f\n",x1);}
                    else
                   {z=sqrt(-y)/(2*a);
                   printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",b,z,b,z);}
                 }
            }
            else
             {if (y>0)
               {x1=(-b + sqrt(b*b-4*a*c))/(2*a);
                x2=(-b - sqrt(b*b-4*a*c))/(2*a);
                printf("x1=%.5f;x2=%.5f\n",x1,x2);}
             else
               {if(y==0)
                   {x1=(-b + sqrt(b*b-4*a*c))/(2*a);
                    x2=(-b - sqrt(b*b-4*a*c))/(2*a);
                    printf("x1=x2=%.5f\n",x1);}
                else
                    {x1=(-b)/(2*a);
                     x2=(-b)/(2*a);
                     z=sqrt(-y)/(2*a);
                     printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",x1,z,x2,z);}
             }
  }  
 } }

    return 0;
}
int main()
{
    int n,e;
    double a,b,c,x1,x2,f,g;
    scanf("%d",&n);
    for(e=1;e<=n;e++)
       {
       scanf("%lf %lf %lf",&a,&b,&c);
       if((b*b)>(4*a*c))
       {x1=(0-b + sqrt(b*b-4*a*c))/(2*a);
        x2=(0-b - sqrt(b*b-4*a*c))/(2*a);
        printf("x1=%.5f;x2=%.5f\n",x1,x2);}
        else if((b*b)<(4*a*c))
        {f=(0-b)/(2*a);
         g=(sqrt((4*a*c)-(b*b)))/(2*a);
         printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",f,g,f,g);
        }
        else
        { x1=(0-b + (sqrt((b*b)-(4*a*c))))/(2*a);
         printf("x1=x2=%.5f\n",x1);}
        }
  
}
/**
* @file homework.cpp
* @author ???
* @date 2011-09-27
* @description
* ??????: ?????????
*/
int main()
{
    int n,k;double a,b,c,x,y; // ???????a,b,c??????x,y
	cin >> n; // n????????
    for(k=0;k<n;k++) // ?????
	{
	    cin>>a>>b>>c; // ?????
        if(b * b - 4 * a * c>0) 
		    {
				x = (- b + sqrt(b * b - 4 * a * c))/(2 * a);
				y = (- b - sqrt(b * b - 4 * a * c))/(2 * a); // ?????????????
	        if(x==-0.00000) x=0.00000; if(y==-0.00000) y=0.00000; // ?????-0.00000??? 
	            cout<<fixed<<setprecision(5)<<"x1="<<x<<";x2="<<y<<endl;
		    }
	    else if(b * b - 4 * a * c == 0) 
		{
			x = (- b)/(2 * a); // ?????
		    if(x == -0.00000) x = 0.00000; if(y == -0.00000) y = 0.00000;
		    cout<<fixed<<setprecision(5)<<"x1=x2="<<x<<endl;
		}
	    else 
		 {
			 x = (- b)/(2 * a);y = (sqrt(4 * a * c - b * b))/(2 * a); // ?????
			 if(x == -0.00000) x = 0.00000; if(y == -0.00000) y = 0.00000;
			     cout<<fixed<<setprecision(5)<<"x1="<<x<<"+"<<y<<"i;x2="<<x<<"-"<<y<<"i"<<endl;
		 }                 
	}
    return 0;
}
int main()
{
int n,i;
double a ,b ,c;
cin>>n;
for(i=1;i<=n;i++)
{
cin>>a>>b>>c;
if(sqrt(b*b-4*a*c)>0)
cout<<fixed<<setprecision(5)<<"x1="<<(-b+1-1 + sqrt(b*b-4*a*c))/(2*a)<<";x2="<<(-b+1-1- sqrt(b*b-4*a*c))/(2*a)<<endl;
else if(sqrt(b*b-4*a*c)==0)
cout<<fixed<<setprecision(5)<<"x1=x2="<<(-b +1-1+ sqrt(b*b-4*a*c))/(2*a)<<endl;
else
cout<<fixed<<setprecision(5)<<"x1="<<(-b+1-1)/(2*a)<<"+"<<sqrt(-b*b+4*a*c)/(2*a)<<"i;x2="<<(-b+1-1)/(2*a)<<"-"<<sqrt(-b*b+4*a*c)/(2*a)<<"i"<<endl;
}
return 0;
}
int main()
{
	int i,n;
	double a,b,c,x1,x2;
	cin>>n;
	for(i=1;i<=n;i=i+1)
	{
		cin>>a>>b>>c;
		if((b*b-4*a*c)>0)
		{
		x1 = (-b + sqrt(b*b-4*a*c))/(2*a);
		x2 = (-b - sqrt(b*b-4*a*c))/(2*a);
		printf("x1=%.5f;x2=%.5f\n",x1,x2);
		}
		else if((b*b-4*a*c)==0)
		{
			x1 = x2 = (-b )/(2*a);
			printf("x1=x2=%.5f\n",x1);
		}
		else
		{
			x1 = (-b)/(2*a);
			if (abs(x1)<0.00001) x1=0;
			x2 = (sqrt(4*a*c-b*b))/(2*a);
			printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",x1,x2,x1,x2);
		}
		
		
	}
}
int main()
{
	int n,i;
	double a,b,c,x[100][5],dt;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%lf %lf %lf",&a,&b,&c);
		dt=b*b-4*a*c;
		if(dt>0.0)
		{
			x[i][0]=1;
			x[i][1]=(-b + sqrt(dt))/(2*a);
			x[i][2]=(-b - sqrt(dt))/(2*a);
		}
		else if(dt==0)
		{
			x[i][0]=2;
			x[i][1]=(-b)/(2*a);
		}
		else
		{
			x[i][0]=3;
			x[i][1]=(-b)/(2*a);
			x[i][3]=(sqrt(-dt))/(2*a);
            x[i][2]=(-b)/(2*a);
			x[i][4]=(sqrt(-dt))/(2*a);
		}
	}
	for(i=0;i<n;i++)
	{
		if(x[i][0]==1)
		{
			printf("x1=%.5f;x2=%.5f\n",x[i][1],x[i][2]);
		}
		else if(x[i][0]==2)
		{
			printf("x1=x2=%.5f\n",x[i][1]);
		}
		else if(x[i][0]==3)
		{
			if(x[i][1]==-0.0)
			x[i][1]=0.0;
			if(x[i][2]==-0.0)
			x[i][2]=0.0;
			printf("x1=%.5f+%.5f",x[i][1],x[i][3],x[i][2],x[i][4]);
			printf("i;x2=%.5f-%.5f",x[i][2],x[i][4]);
			printf("i\n");
		}
	}
	return 0;
}
int main()
{
 double a,b,c,x1,x2,x3,decision;
 int n,i,j;
 scanf("%d",&n);
 for(i=1;i<=n;i++)
 { scanf("%lf%lf%lf",&a,&b,&c);
   decision=b*b-4*a*c;
   if (decision==0)
	   printf("x1=x2=%.5lf\n",(-1)*b/(2*a));
   if (decision>0)
   {
   x1 = ((-1)*b + sqrt(b*b-4*a*c))/(2*a); 
   x2 = ((-1)*b - sqrt(b*b-4*a*c))/(2*a); 
   printf("x1=%.5lf;x2=%.5lf\n",x1,x2);
   }
   if (decision<0)
   {x1=(-1)*b/(2*a);
    x3=sqrt((-1)*decision)/(2*a);
	if ((x1<0.001) &&((-1)*x1<0.001))
		printf("x1=0.00000+%.5lfi;x2=0.00000-%.5lfi\n",x3,x3);
	else
     printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",x1,x3,x1,x3);
   }
 }
}
int main(){
	int n;
	scanf("%d",&n);
    int j;
	for(j=1;j<=n;j++){
		double a1,b1,c1,x1,x2,m;
	    scanf("%lf%lf%lf",&a1,&b1,&c1);
         m=b1*b1-4*a1*c1;
		 if(m>0){
        x1 = (-b1 + sqrt(b1*b1-4*a1*c1))/(2*a1); 
        x2 = (-b1 - sqrt(b1*b1-4*a1*c1))/(2*a1);
        printf("x1=%.5f;x2=%.5f\n",x1,x2);}
		 if(m==0){
			 x1=(-b1)/(2*a1);
			printf("x1=x2=%.5f\n",x1);}	 
       if(m<0){
	   double y1,y2;
       y1 = (-b1)/(2*a1); 
       y2 = (sqrt(-m))/(2*a1);
      if(b1==0.00000){
       printf("x1=%.5f+%.5fi;",-y1,y2);
       printf("x2=%.5f-%.5fi\n",-y1,y2);}
	   else{ printf("x1=%.5f+%.5fi;",y1,y2);
       printf("x2=%.5f-%.5fi\n",y1,y2);}
             }

	}
        
	return 0;
}
main()
{
float m[100][3];
double x1,x2,delt,a,b,c,s,t;
int n,i,j;
scanf("%d",&n);
for(i=0;i<=n-1;i++)
     {
     for(j=0;j<=2;j++)
           {
           scanf("%f",&m[i][j]);
           }
     }
for(i=0;i<=n-1;i++)
     {
     a=(double)m[i][0];
     b=(double)m[i][1];
     c=(double)m[i][2];
     delt=(double)(b*b-4*a*c);
     if(delt>0)
           {
            x1 = (-b+1+sqrt(b*b-4*a*c))/(2*a)-1/(2*a);
            x2 = (-b+1-sqrt(b*b-4*a*c))/(2*a)-1/(2*a);
            printf("x1=%.5f;x2=%.5f\n",x1,x2);
           }
     if(delt==0)
           {
            x1 = (-b+1+sqrt(b*b-4*a*c))/(2*a)-1/(2*a);
            x2 = (-b+1-sqrt(b*b-4*a*c))/(2*a)-1/(2*a);
            printf("x1=x2=%.5f\n",x1);
           }
     if(delt<0)
           {
            s=((-b+1)/(2*a))-1/(2*a);
            t=(sqrt(4*a*c-b*b)/(2*a));
            printf("x1=%.5f+%.5fi;x2=%.5f%.5fi\n",s,t,s,-t);
           }
     }
}
int main(int argc, char *argv[])
{
  int n,i;
  double a,b,c;
  scanf("%d",&n);
  for(i=1;i<=n;i++)
  {scanf("%lf%lf%lf",&a,&b,&c);
  if(b*b-4*a*c>=0.00001)
  printf("x1=%.5f;x2=%.5f",(-b+sqrt(b*b-4*a*c))/(2*a),(-b-sqrt(b*b-4*a*c))/(2*a));
  else if(b*b-4*a*c<=-0.00001&&b!=0) 
  printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi",-b/(2*a),sqrt(4*a*c-b*b)/(2*a),-b/(2*a),sqrt(4*a*c-b*b)/(2*a));
  else if(b*b-4*a*c<=-0.00001&&b==0) 
  printf("x1=0.00000+%.5fi;x2=0.00000-%.5fi",sqrt(4*a*c)/(2*a),sqrt(4*a*c)/(2*a));
  else printf("x1=x2=%.5f",-b/(2*a));
  if(i!=n) printf("\n");
}	
  return 0;
}
void main()
{
	double a[32768],b[32768],c[32768];
	int n,i;
	double d,x1,x2,e;
    scanf("%d",&n);
    for(i=1;i<=n;i++)
		scanf("%lf %lf %lf",&a[i],&b[i],&c[i]);
	for(i=1;i<=n;i++)
	{
		if (fabs(a[i])<1e-16)
			printf("Wrong\n");
		else 
		{
			d=b[i]*b[i]-4*a[i]*c[i];
			if (fabs(d)<1e-16)
			{
			         x1=-b[i]/(2*a[i]);
			         x2=-b[i]/(2*a[i]);
				if (fabs(x1)<5e-6) x1=0;
				if (fabs(x2)<5e-6) x2=0;
			    printf("x1=x2=%.5f\n",x1);
			}
		    else if (d>=1e-16)
			{
				x1=(-b[i]+sqrt(d))/(2*a[i]);
				x2=(-b[i]-sqrt(d))/(2*a[i]);
                                     if (fabs(x1)<5e-6) x1=0;
				if (fabs(x2)<5e-6) x2=0;
				printf("x1=%.5f;x2=%.5f\n",x1,x2);
			}
			else
			{
				x1=-b[i]/(2*a[i]);
			         x2=-b[i]/(2*a[i]);
				if (fabs(x1)<5e-6) x1=0;
				if (fabs(x2)<5e-6) x2=0;
				e=sqrt(-d)/(2*a[i]);
				if (fabs(e)<5e-6) printf("x1=x2=%.5f\n",x1);
				else
					printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",x1,e,x2,e);
			}
		}
	}
}
int main(int argc, char* argv[])
{
	int n;
	scanf("%d",&n);
	double x1,x2;
	float a[N],b[N],c[N];
    int i;
	for(i=0;i<n;i++)
	{
		scanf("%f%f%f",&a[i],&b[i],&c[i]);
	}
	for(i=0;i<n;i++)
	{
		if(a!=0)
		{ double m,n,p;
		  m=(-b[i])/(2*a[i]);
		  n=sqrt((b[i]*b[i]-4*a[i]*c[i]))/(2*a[i]);
		  p=sqrt(4*a[i]*c[i]-b[i]*b[i])/(2*a[i]);
	      if(b[i]*b[i]-4*a[i]*c[i]>0)
		  {
			  x1=m+n;
			  x2=m-n;
		     printf("x1=%.5f;x2=%.5f\n",x1,x2);
		  }
		  else if(b[i]*b[i]-4*a[i]*c[i]==0)
		  {
		     printf("x1=x2=%.5f\n",m);
		  }else
		  {
		    printf("x1=%.5f+%.5fi;",m,p);
			printf("x2=%.5f-%.5fi\n",m,p);
		  }
		}
	}
	return 0;
}
double a,b,c,x1,x2,d;
int n,i;

double test(double p)
{
    if((p-0<0.000000001)&&(0-p<0.000000001)) return 0;
    else return p;
}

void doit()
{
    scanf("%lf %lf %lf",&a,&b,&c);
    d=b*b-4*a*c;
    d=test(d);
    if((d-0<0.000000001)&&(0-d<0.000000001))
    {
        x1=-b/(2*a);
        x1=test(x1);
        printf("x1=x2=%.5f\n",x1);
        return ;
    }
    if(d>0)
    {
        x1=(-b+sqrt(d))/(2*a);
        x1=test(x1);
        x2=(-b-sqrt(d))/(2*a);
        printf("x1=%.5f;x2=%.5f\n",x1,x2);
        return ;
    }
    if(d<0)
    {
        x1=-b/(2*a);
        x1=test(x1);
        x2=sqrt(-d)/(2*a);
        printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",x1,x2,x1,x2);
        return ;
    }
}

int main()
{
    scanf("%d",&n);
    for(i=1;i<=n;i++)
        doit();
    return 0;
}
main()
{
	int n,i;
	float a,b,c,m,x1,x2;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	  {
	  	scanf("%f %f %f",&a,&b,&c); 
  		m=b*b-4*a*c;
  		if(m==0) printf("x1=x2=%.5f\n",(-b)/(2*a));
  		else  if(m>0) 
  		 {//x1=((-b) + sqrt(b*b-4*a*c))/(2*a);
  		 //x2 = ((-b) - sqrt(b*b-4*a*c))/(2*a);
  		 //printf("x1=%.5f;x2=%.5f\n",x1,x2);
  		 printf("x1=%.5f;x2=%.5f\n",((-b) + sqrt(b*b-4*a*c))/(2*a),((-b) - sqrt(b*b-4*a*c))/(2*a));
  		 
  		 }
 		 else 
 		   {
	       if(b==0)  printf("x1=0.00000+%.5fi;x2=0.00000-%.5fi\n",sqrt(-m)/(2*a),sqrt(-m)/(2*a)); 
		   else  printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",-b/(2*a),sqrt(-m)/(2*a),-b/(2*a),sqrt(-m)/(2*a)); }
  	} 
}
int main()
{
	double a,b,c,delta,m,n;
	int i = 0;
	scanf("%d",&i);
	while(i--)
	{
		scanf("%lf%lf%lf",&a,&b,&c);
		delta=b*b-4*a*c;
		
		if(delta<0)
		{
			m=-b/2/a;
			n=sqrt(-delta)/2/a;
			printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",m,n,m,n);
		}
		else 
			if(delta==0)
			{
				m=-b/2/a;
				printf("x1=x2=%.5lf\n",m);
			}
			else 
			{
				m=-b/2/a;
				n=sqrt(delta)/2/a;
				printf("x1=%.5lf;x2=%.5lf\n",m+n,m-n);
			}
	}
	return 0;
}
int main()
{
	int n,i;
	double t = 0.00001; 
	float a,b,c;
	double x1,x2;
	double j,w; 
	double delta;
	scanf("%d",&n);
	for (i = 0; i < n; i++)
	{
		a = b = c = 0; 
		delta = 0;
		x1 = x2 = 0;
		j = w = 0; 
		scanf("%f %f %f",&a,&b,&c);
		delta = b * b - 4 * a * c;
		if (abs(delta) < t)
		{
			x1 = - b / (2 * a);
			printf("x1=x2=%.5f\n",x1);
		} 
		else if(delta > 0)
		{
			x1 = (-b + sqrt(delta))/(2 * a);
			x2 = (-b - sqrt(delta))/(2 * a);
			printf("x1=%.5f;x2=%.5f\n",x1,x2);	
		} 
		else
		{
			w = -b / (2 * a);
			if(w < t && w > -t)
				w = 0; 
			j = sqrt(-delta)/ (2 * a);
			if(j > 0)
				printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",w,j,w,j);
			else
			{
				j = -j;
				printf("x1=%.5f-%.5fi;x2=%.5f+%.5fi\n",w,j,w,j);
			}
		}
	}  
	return 0; 
}
int main()
{
	#define i
	int n,k;
	float a,b,c;
    scanf("%d",&n);
	

	for (k=0;k<n;k++)
	{	
		scanf("%f%f%f",&a,&b,&c);
	if (b!=0)
	{
		if (b*b==4*a*c)
			printf("x1=x2=%.5lf\n",-b/2/a);
	    else if (b*b-4*a*c>0)
			printf("x1=%.5lf;x2=%.5lf\n",(-b+sqrt(b*b-4*a*c))/(2*a),(-b-sqrt(b*b-4*a*c))/(2*a));
      	else
            printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",-b/2/a,sqrt(4*a*c-b*b)/(2*a),-b/2/a,sqrt(4*a*c-b*b)/(2*a));
	}
	else
	{
		if (a*c<0)
		  printf("x1=0.00000+%.5lf;x2=0.00000+%.5lf\n",(sqrt(b*b-4*a*c))/(2*a),(-sqrt(b*b-4*a*c))/(2*a));  
	    if (a*c>0)
          printf("x1=0.00000+%.5lfi;x2=0.00000-%.5lfi\n",sqrt(4*a*c-b*b)/2/a,sqrt(4*a*c)/2/a);
	}
	}
  return 0;
}
void main()
{
	int n,i;
	double a[100],b[100],c[100],x1,x2;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%lf%lf%lf",&a[i],&b[i],&c[i]);
	}
	for(i=0;i<n;i++)
	{
		if(b[i]*b[i]-4*a[i]*c[i]>0)
		{
			x1=(-b[i]+sqrt(b[i]*b[i]-4*a[i]*c[i]))/(2*a[i]);
			x2=(-b[i]-sqrt(b[i]*b[i]-4*a[i]*c[i]))/(2*a[i]);
			printf("x1=%.5lf;x2=%.5lf\n",x1,x2);
		}
		else if(b[i]*b[i]-4*a[i]*c[i]==0)
		{
			x1=x2=(-b[i])/(2*a[i]);
			printf("x1=x2=%.5lf\n",x1);
		}
		else
		{
			x1=(-b[i])/(2*a[i]);
			x2=sqrt(-b[i]*b[i]+4*a[i]*c[i])/(2*a[i]);
			printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",x1,x2,x1,x2);
		}
	}
}
main()
{
   int n,i,j;
   double s,c,d,e;
   float t;
   scanf("%d",&n);
   float a[n][3];
   for(i=0;i<=(n-1);i++)
   {
     for(j=0;j<=2;j++)
     {
       scanf("%f",&t);
       a[i][j]=t;
      } 
   }
   for(i=0;i<=(n-1);i++)
   {                   
     s=a[i][1]*a[i][1]-4*a[i][0]*a[i][2];
     if(s>1e-6)  
     {
     c = (-a[i][1] + sqrt(s))/(2*a[i][0]); 
     d = (-a[i][1] - sqrt(s))/(2*a[i][0]);
     if(fabs(c)<1e-6)c=0.00000;
     if(fabs(d)<1e-6)c=0.00000;
     printf("x1=%0.5f;x2=%0.5f\n",c,d);
     }
     else if(fabs(s)<1e-6)
     {
       c=-a[i][1]/(2*a[i][0]);
       if(fabs(c)<1e-6)c=0.00000;
       printf("x1=x2=%.5f\n",c);
     } 
     else
     {
       c=sqrt(-s)/(2*a[i][0]);
       if(fabs(a[i][1])>1e-6)d=-a[i][1]/(2*a[i][0]);
       else d=0.00000;
       if(c<1e-6)printf("x1=%.5f%.5fi;x2=%.5f+%.5fi\n",d,c,d,-c);
       else printf("x1=%.5f+%.5fi;x2=%.5f%.5fi\n",d,c,d,-c);
     }    
    }            
     getchar();
     getchar();
     getchar();
     getchar();
}
/*
 * hw20130925(7.cpp
 *
 *  Created on: 2013-9-28
 *      Author: KyLin
 */
int main ()
{
	int n1;                      //???????
	cin>>n1;
	const int n=n1;
	int t;
	double deta;
	double a[n],b[n],c[n];        //a,b,c????x1?x2???real????imag???,deta????
	double x1[n],x2[n];
	double real[n],imag[n];
	for (t=0;t<n;++t)
		a[t]=b[t]=c[t]=x1[t]=x2[t]=real[t]=imag[t]=0;    //??????
	for (t=0;t<n;++t)
		cin>>a[t]>>b[t]>>c[t];
	for (t=0;t<n;++t)
	{
		deta=b[t]*b[t]-4*a[t]*c[t];
		if (deta>0)                     //????deta??????
		{
			x1[t]=(-b[t]+sqrt(deta))/(2*a[t]);
			x2[t]=(-b[t]-sqrt(deta))/(2*a[t]);
			cout<<fixed<<setprecision(5)<<"x1="<<x1[t]<<";x2="<<x2[t]<<endl;
		}
		if (deta==0)
		{
			x1[t]=(-b[t])/(2*a[t]);
			x2[t]=x1[t];
			cout<<fixed<<setprecision(5)<<"x1=x2="<<x1[t]<<endl;
		}
		if (deta<0)
		{
			real[t]=(-b[t])/(2*a[t]);
			imag[t]=sqrt(abs(deta))/(2*a[t]);
			if (real[t]==0)
			{
				cout<<fixed<<setprecision(5)<<"x1="<<abs(real[t])<<"+"<<imag[t]<<"i;x2="<<abs(real[t])<<-imag[t]<<"i"<<endl;
			}
			else
				cout<<fixed<<setprecision(5)<<"x1="<<real[t]<<"+"<<imag[t]<<"i;x2="<<real[t]<<-imag[t]<<"i"<<endl;
		}
	}
	return 0;
}
int main(int argc, char* argv[])
{
	
	double a,b,c;
	int n;
	double x1,x2,m,p,q;
	int i=0;
	scanf ("%d",&n);
	for (i=0;i<n;i++)
	{	scanf ("%lf%lf%lf",&a,&b,&c);
        
		m=b*b-4*a*c;
		if (m==0)
		{
			p=(-b)/(2*a);
			printf ("x1=x2=%.5lf\n",p);
		}
		if (m>0)
		{
			p=(-b + sqrt(b*b-4*a*c))/(2*a);
			q=(-b - sqrt(b*b-4*a*c))/(2*a);
	        printf ("x1=%.5lf;x2=%.5lf\n",p,q);
		}
		if (m<0)
		{
            p=(-b)/(2*a) ;
			q= (sqrt(-b*b+4*a*c)/(2*a));
	        printf ("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",p,q,p,q);
	}}

		return 0;
}
int main()
{
	int n;
	double a,b,c,x1,x2,e,f,g;
     scanf("%d\n",&n);
while(n--)
	{
	scanf("%lf %lf %lf\n",&a,&b,&c);
	e=b*b-4*a*c;
	if(e>0)
	{
		x1=(-b+sqrt(b*b-4*a*c))/(2*a);
	    x2=(-b-sqrt(b*b-4*a*c))/(2*a);
		printf("x1=%.5lf;x2=%.5lf\n",x1,x2);
	}
	else if(e==0)
	{
		x1=(-b)/(2*a);
		printf("x1=x2=%.5lf\n",x1);
	}
	if(e<0)
	{
		f=(-b)/(2*a);
		g=sqrt(-(b*b-4*a*c))/(2*a);
		printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",f,g,f,g);
	}
}
return 0;
}