Beispiel #1
0
int
benchmark (void)
{
  a = in1;
  result = qurt();
  a = in2;
  result = qurt();
  a = in3;
  result = qurt();
  return 0;
}
Beispiel #2
0
int
benchmark (void)
{
  a[0] =  1.0;
  a[1] = -3.0;
  a[2] =  2.0;

  result = qurt();


  a[0] =  1.0;
  a[1] = -2.0;
  a[2] =  1.0;

  result = qurt();


  a[0] =  1.0;
  a[1] = -4.0;
  a[2] =  8.0;

  result = qurt();
  return 0;
}
Beispiel #3
0
int main()
{

   double a[3];
   double x1_1,  x1_2,  x2_1,  x2_2;
	a[0] =  3.0;
	a[1] =  8.0;
	a[2] =  4.0;

	qurt(a, &x1_1, &x1_2, &x2_1, &x2_2);
    printf("The quadratic equation is : %fx^2 + %fx + %f\n", a[0], a[1], a[2]);
	printf("Its roots are: %f, %f, %f, %f \n", x1_1, x1_2, x2_1, x2_2);

  return 0;
}