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

void polar(double x, double y, double *r, double *theta)
{
  *r = sqrt(x*x + y*y);
  *theta = atan2(y,x);
}

int main()
{
  double a, b; float c, d;
  
  polar(-1.0, 1.0, &a, &b);
  printf("a = %g\nb = %g\n", a, b);
  return 0;
}
