<gouthampradhan>binary_search_PowXN_1.java
public double solve(double x, long n) {
    if (n == 1) return x;
    double val = solve(x, n / 2);
    return val * val * ((n % 2) == 0 ? 1 : x);
  }
public double sample_funcname ( double x , long n ) {
  if ( n == 1 ) return x ;
  double val = solve ( x , n / 2 ) ;
  return val * val * ( ( n % 2 ) == 0 ? 1 : x ) ;
}
