#include <stdio.h>
#include <stdlib.h>
#include <math.h>

float f(float);
float bisectr(float l, float r);

float epsilon;

int main(int argc, char *argv[])
{
  epsilon=atof(argv[3]);
  printf("%f\n", bisectr(atof(argv[1]), atof(argv[2])));
  return 0;
}

float bisectr(float l, float r)
  {
    float m;
    m = (l + r) / 2; 
    if ((r - l) < epsilon) return m;
    if (f(m)*f(r) <= 0.0) 
      return bisectr(m, r); 
    else 
      return bisectr(l, m);
  }

float f(float x)
{
  return sin(x);

}
