static double svd_pythag(double a,double b){
  double p, r, s, t, u, temp;
  p=svd_dmax(Math.abs(a),Math.abs(b));
  if (p != 0.0) {
    temp=svd_dmin(Math.abs(a),Math.abs(b)) / p;
    r=temp * temp;
    t=4.0 + r;
    while (t != 4.0) {
      s=r / t;
      u=1.0 + 2.0 * s;
      p*=u;
      temp=s / u;
      r*=temp * temp;
      t=4.0 + r;
    }
  }
  return p;
}

static double svd_pythag ( double a , double b ) { double p , r , s , t , u , temp ; p = svd_dmax ( Math . abs ( a ) , Math . abs ( b ) ) ; if ( p != 0.0 ) { temp = svd_dmin ( Math . abs ( a ) , Math . abs ( b ) ) / p ; r = temp * temp ; t = 4.0 + r ; while ( t != 4.0 ) { s = r / t ; u = 1.0 + 2.0 * s ; p *= u ; temp = s / u ; r *= temp * temp ; t = 4.0 + r ; } } return p ; }
funtions used - - - - - - - - - - - - - utility dmax , dmin
