[Vinecopula-commits] r64 - pkg/src

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Di Apr 22 15:49:05 CEST 2014


Author: ulf
Date: 2014-04-22 15:49:04 +0200 (Tue, 22 Apr 2014)
New Revision: 64

Modified:
   pkg/src/deriv.c
   pkg/src/deriv2.c
   pkg/src/hfunc.c
   pkg/src/hfuncderiv.c
   pkg/src/hfuncderiv2.c
   pkg/src/likelihood.c
Log:
Kleine Warnings behoben in den C-files. Gefunden durch neuen Kompiler

Modified: pkg/src/deriv.c
===================================================================
--- pkg/src/deriv.c	2014-03-26 15:18:51 UTC (rev 63)
+++ pkg/src/deriv.c	2014-04-22 13:49:04 UTC (rev 64)
@@ -1,513 +1,513 @@
-/*
-** deriv.c - C code of the package CDRVine  
-** 
-** by Ulf Schepsmeier
-** 
-** 
-**
-*/
-
-#include "include/vine.h"
-#include "include/deriv.h"
-#include "include/tcopuladeriv.h"
-#include "include/tcopuladeriv_new.h"
-
-#define UMAX  1-1e-10
-
-#define UMIN  1e-10
-
-#define XEPS 1e-4
-
-
-
-/////////////////////////////////////////////////////////////
-//
-// Ableitung der Copula nach dem Parameter
-//
-/////////////////////////////////////////////////////////////
-
-void diffPDF_mod(double* u, double* v, int* n, double* param, int* copula, double* out)
-{
-  double* negv;
-  double* negu;
-  double* nparam;
-  negv = (double *) malloc(*n*sizeof(double));
-  negu = (double *) malloc(*n*sizeof(double));
-  nparam = (double *) malloc(2*sizeof(double));
-  int ncopula;
-  nparam[0]=-param[0];
-  nparam[1]=-param[1];
-  int i;
-
-if((*copula==43))
-	{
-		ncopula=3;
-		if(param[0] > 0){
-			nparam[0]=2*(param[0])/(1-param[0]);
-			diffPDF(u, v, n, nparam, &ncopula, out);
-			for(i=0;i<*n;i++){out[i]=out[i]*2/pow(1-param[0],2);}
-		}else{
-			nparam[0]=-2*(param[0])/(1+param[0]);
-			for (i = 0; i < *n; ++i) {negv[i] = 1 - v[i];}
-			diffPDF(u, negv, n, nparam, &ncopula, out);
-			for(i=0;i<*n;i++){out[i]=-out[i]*2/pow(1+param[0],2); }
-		}
-	}else if((*copula==44))
-	{
-		ncopula=4;
-		if(param[0] > 0){
-			nparam[0]=1/(1-param[0]);
-			diffPDF(u, v, n, nparam, &ncopula, out);
-			for(i=0;i<*n;i++){out[i]=out[i]/pow(1-param[0],2);}
-		}else{
-			nparam[0]=1/(1+param[0]);
-			for (i = 0; i < *n; ++i) {negv[i] = 1 - v[i];}
-			diffPDF(u, negv, n, nparam, &ncopula, out);
-			for(i=0;i<*n;i++){out[i]=-out[i]/pow(1+param[0],2); }
-		}
-	}else{
-
-  if(((*copula==23) | (*copula==24) | (*copula==26) | (*copula==27) | (*copula==28) | (*copula==29) | (*copula==30)))	// 90° rotated copulas
-    {
-	  ncopula = (*copula)-20;
-      for (i = 0; i < *n; ++i) {negv[i] = 1 - v[i];}
-	  diffPDF(u, negv, n, nparam, &ncopula, out);
-	  for(i=0;i<*n;i++){out[i]=-out[i];}
-    }
-  else if(((*copula==33) | (*copula==34) | (*copula==36) | (*copula==37) | (*copula==38) | (*copula==39) | (*copula==40)))	// 270° rotated copulas
-    {
-	  ncopula = (*copula)-30;
-      for (i = 0; i < *n; ++i) {negu[i] = 1 - u[i];}
-	  diffPDF(negu, v, n, nparam, &ncopula, out);
-	  for(i=0;i<*n;i++){out[i]=-out[i];}
-    }
-  else if(((*copula==13) | (*copula==14) | (*copula==16) | (*copula==17) | (*copula==18) | (*copula==19) | (*copula==20)))	// 180° rotated copulas
-	{
-		ncopula = (*copula)-10;
-		for (i = 0; i < *n; ++i) 
-		{
-			negv[i] = 1 - v[i];
-			negu[i] = 1 - u[i];
-		}
-		diffPDF(negu, negv, n, param, &ncopula, out);
-	}
-  else 
-	{
-		diffPDF(u, v, n, param, copula, out);
-	}
-	}
-  free(negv);
-  free(negu);
-  free(nparam);
-}
-
-
-
-
-void diffPDF(double* u, double* v, int* n, double* param, int* copula, double* out)
-{
-	int j;
-	double t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t24, t26, t27, t28, t29, t30, t32, t33, t34, t35, t36;
-	t3=0;
-	t4=0;
-
-	double theta = param[0];
-	//double delta = param[1];
-
-	for(j=0;j<*n;j++)
-	{
-		if(*copula==0)
-		{
-			out[j]=0;
-		}
-		else if(*copula==1)
-		{
-			t1 = qnorm(u[j],0.0,1.0,1,0); 
-			t2 = qnorm(v[j],0.0,1.0,1,0);
-			t4 = t1*t1;
-			t5 = t2*t2;
-			t3 = t4+t5;
-			t7 = theta*theta;
-			t8 = 1.0-t7;
-			t9 = 1/t8/2.0;
-			t15 = t7*t3-2.0*theta*t1*t2;
-			t22 = exp(-t15*t9);
-			t24 = sqrt(t8);
-			out[j] = (-2.0*(theta*t3-t1*t2)*t9-t15/(t8*t8)*theta)*t22/t24+t22/t24/t8*theta;
-		}
-		else if(*copula==3)
-		{
-			t1 = u[j]*v[j];
-			t2 = -theta-1.0;
-			t3 = pow(t1,1.0*t2);
-			t4 = pow(u[j],-1.0*theta);
-			t5 = pow(v[j],-1.0*theta);
-			t6 = t4+t5-1.0;
-			t7 = -2.0-1/theta;
-			t8 = pow(t6,1.0*t7);
-			t9 = -t2*t3;
-			t10 = log(t1);
-			t11 = theta*theta;
-			t12 = log(t6);
-			t13 = log(u[j]);
-			t14 = log(v[j]);
-			out[j] = t3*t8-t9*t10*t8+t9*t8*(1/t11*t12+t7*(-t4*t13-t5*t14)/t6);
-		}
-		else if(*copula==4)
-		{
-			t3 = log(u[j]);
-			  t4 = pow(-t3,1.0*theta);
-			  t5 = log(v[j]);
-			  t6 = pow(-t5,1.0*theta);
-			  t7 = t4+t6;
-			  t8 = 1/theta;
-			  t9 = pow(t7,1.0*t8);
-			  t10 = theta*theta;
-			  t12 = log(t7);
-			  t13 = 1/t10*t12;
-			  t14 = log(-t3);
-			  t16 = log(-t5);
-			  t18 = t4*t14+t6*t16;
-			  t20 = 1/t7;
-			  t22 = -t13+t8*t18*t20;
-			  t24 = exp(-t9);
-			  t26 = t24/u[j];
-			  t28 = 1/v[j];
-			  t29 = -1.0+t8;
-			  t30 = pow(t7,2.0*t29);
-			  t32 = t3*t5;
-			  t33 = theta-1.0;
-			  t34 = pow(t32,1.0*t33);
-			  t35 = pow(t7,-1.0*t8);
-			  t36 = t33*t35;
-			  t17 = 1.0+t36;
-			  t15 = t34*t17;
-			  t11 = t26*t28;
-			  t2 = t30*t34;
-			  t1 = log(t32);
-			  out[j] = -t9*t22*t26*t28*t30*t15+t11*t30*(-2.0*t13+2.0*t29*t18*t20)*t15+t11*
-					t2*t1*t17+t11*t2*(t35-t36*t22);
-
-		}
-		else if(*copula==5)
-		{
-			t2 = exp(theta);
-			t3 = t2-1.0;
-			t4 = theta*v[j];
-			t5 = theta*u[j];
-			t7 = exp(t4+t5+theta);
-			t10 = exp(t4+t5);
-			t12 = exp(t4+theta);
-			t14 = exp(t5+theta);
-			t15 = t10-t12-t14+t2;
-			t16 = t15*t15;
-			t17 = 1/t16;
-			t21 = theta*t3;
-			out[j] = t3*t7*t17+theta*t2*t7*t17+t21*(v[j]+u[j]+1.0)*t7*t17-2.0*t21*t7/t15/t16*((v[j]+u[j])*t10-(v[j]+1.0)*t12-(u[j]+1.0)*t14+t2);
-		}
-		else if(*copula==6)
-		{
-			t1 = 1.0-u[j];
-			t2 = pow(t1,1.0*theta);
-			t3 = 1.0-v[j];
-			t4 = pow(t3,1.0*theta);
-			t5 = t2*t4;
-			t6 = t2+t4-t5;
-			t8 = 1/theta-2.0;
-			t9 = pow(t6,1.0*t8);
-			t10 = theta*theta;
-			t11 = log(t6);
-			t12 = log(t1);
-			t13 = t2*t12;
-			t14 = log(t3);
-			t15 = t4*t14;
-			t16 = t13*t4;
-			t19 = t5*t14;
-			t21 = theta-1.0;
-			t27 = pow(t1,1.0*t21);
-			t28 = pow(t3,1.0*t21);
-			t30 = theta-1.0+t2+t4-t5;
-			t33 = t9*t27;
-			out[j] = t9*(-1/t10*t11+t8*(t13+t15-t16-t19)/t6)*t27*t28*t30+t33*t12*t28*t30
-					+t33*t28*t14*t30+t33*t28*(1.0+t13+t15-t16-t19);
-		}
-
-	}
-
-}
-
-
-////////////////////////////////////////////////////////////////////
-//
-// 1. Ableitung von c nach u
-//
-////////////////////////////////////////////////////////////////////
-
-void diffPDF_u_mod(double* u, double* v, int* n, double* param, int* copula, double* out)
-{
-  double* negv;
-  double* negu;
-  double* nparam;
-  negv = (double *) malloc(*n*sizeof(double));
-  negu = (double *) malloc(*n*sizeof(double));
-  nparam = (double *) malloc(2*sizeof(double));
-  int ncopula, i;
-  nparam[0]=-param[0];
-  nparam[1]=-param[1];
-
-if((*copula==43))
-	{
-		ncopula=3;
-		if(param[0] > 0){
-			nparam[0]=2*(param[0])/(1-param[0]);
-			diffPDF_u(u, v, n, nparam, &ncopula, out);
-		}else{
-			nparam[0]=-2*(param[0])/(1+param[0]);
-			for (i = 0; i < *n; ++i) {negv[i] = 1 - v[i];}
-			diffPDF_u(u, negv, n, nparam, &ncopula, out);
-			//for(i=0;i<*n;i++){out[i]=-out[i];}
-		}
-	}else if((*copula==44))
-	{
-		ncopula=4;
-		if(param[0] > 0){
-			nparam[0]=1/(1-param[0]);
-			diffPDF_u(u, v, n, nparam, &ncopula, out);
-		}else{
-			nparam[0]=1/(1+param[0]);
-			for (i = 0; i < *n; ++i) {negv[i] = 1 - v[i];}
-			diffPDF_u(u, negv, n, nparam, &ncopula, out);
-			//for(i=0;i<*n;i++){out[i]=-out[i];}
-		}
-	}else{
-
-  if(((*copula==23) | (*copula==24) | (*copula==26) | (*copula==27) | (*copula==28) | (*copula==29) | (*copula==30)))	// 90° rotated copulas
-    {
-	  ncopula = (*copula)-20;
-      for (i = 0; i < *n; ++i) {negv[i] = 1 - v[i];}
-	  diffPDF_u(u, negv, n, nparam, &ncopula, out);
-	  //for(i=0;i<*n;i++){out[i]=-out[i];}
-    }
-  else if(((*copula==33) | (*copula==34) | (*copula==36) | (*copula==37) | (*copula==38) | (*copula==39) | (*copula==40)))	// 270° rotated copulas
-    {
-	  ncopula = (*copula)-30;
-      for (i = 0; i < *n; ++i) {negu[i] = 1 - u[i];}
-	  diffPDF_u(negu, v, n, nparam, &ncopula, out);
-	  for(i=0;i<*n;i++){out[i]=-out[i];}
-    }
-  else if(((*copula==13) | (*copula==14) | (*copula==16) | (*copula==17) | (*copula==18) | (*copula==19) | (*copula==20)))	// 180° rotated copulas
-	{
-		ncopula = (*copula)-10;
-		for (i = 0; i < *n; ++i) 
-		{
-			negv[i] = 1 - v[i];
-			negu[i] = 1 - u[i];
-		}
-		diffPDF_u(negu, negv, n, param, &ncopula, out);
-		for(i=0;i<*n;i++){out[i]=-out[i];}
-	}
-  else 
-	{
-		diffPDF_u(u, v, n, param, copula, out);
-	}
-	}
-  free(negv);
-  free(negu);
-  free(nparam);
-}
-
-void diffPDF_u(double* u, double* v, int* n, double* param, int* copula, double* out)
-{
-	int j, k=1;
-	double t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t18, t19, t20, t21, t22, t23, t24, t25, t27, t28, t29;
-	double t30, t33, t36;
-
-	double theta = param[0];
-	//double delta = param[1];
-
-	for(j=0;j<*n;j++)
-	{
-		if(*copula==0)
-		{
-			out[j]=0;
-		}
-		else if(*copula==1)
-		{
-			t1 = qnorm(u[j],0.0,1.0,1,0); 
-			t2 = qnorm(v[j],0.0,1.0,1,0);
-			t3 = theta*theta;
-			t4 = 1.0-t3;
-			t5 = sqrt(t4);
-			t6 = pow(t1,2.0);
-			t7 = pow(t2,2.0);
-			t8 = t3*(t6+t7)-(2.0*theta*t1*t2);
-			t9 = exp(-t8/t4/2.0);
-			t10 = t9/t5;
-			t11 = sqrt(2.0*pi);
-			t12 = exp(-t6/2.0);
-			t13 = t11/t12;
-			out[j] = -t10*(theta*t13/t4)*(theta*t1-t2);
-		}
-		else if(*copula==2)
-		{
-			diffPDF_u_tCopula_new(&u[j], &v[j], &k, param, copula, &out[j]);
-		}
-		else if(*copula==3)
-		{
-			t1 = 1.0+theta;
-			t3 = pow(u[j]*v[j],-1.0*t1);
-			t4 = t1*t3;
-			t5 = 1/u[j];
-			t7 = pow(u[j],-1.0*theta);
-			t8 = pow(v[j],-1.0*theta);
-			t9 = t7+t8-1.0;
-			t11 = -2.0-1/theta;
-			t12 = pow(t9,1.0*t11);
-			out[j] = -t4*t1*t5*t12-t4*t12*t11*t7*theta*t5/t9;
-		}
-		else if(*copula==4)
-		{
-			t3 = log(u[j]);
-			t4 = pow(-t3,1.0*theta);
-			t5 = log(v[j]);
-			t6 = pow(-t5,1.0*theta);
-			t7 = t4+t6;
-			t8 = 1/theta;
-			t9 = pow(t7,1.0*t8);
-			t11 = u[j]*u[j];
-			t12 = 1/t11;
-			t13 = 1/t3;
-			t15 = 1/t7;
-			t18 = exp(-t9);
-			t19 = 1/v[j];
-			t21 = -1.0+t8;
-			t22 = pow(t7,2.0*t21);
-			t24 = theta-1.0;
-			t25 = pow(t3*t5,1.0*t24);
-			t27 = pow(t7,-1.0*t8);
-			t28 = t24*t27;
-			t29 = 1.0+t28;
-			t30 = t22*t25*t29;
-			t33 = t18*t12;
-			t36 = t19*t22;
-			out[j] = -t9*t4*t12*t13*t15*t18*t19*t30-t33*t19*t30+2.0*t33*t36*t21*t4*theta
-					*t13*t15*t25*t29+t33*t36*t25*t24*t13*t29-t33*t36*t25*t28*t4*t13*t15;
-		}
-		else if(*copula==5)
-		{
-			t1 = theta*theta;
-			t2 = exp(theta);
-			t3 = t2-1.0;
-			t5 = theta*v[j];
-			t6 = theta*u[j];
-			t8 = exp(t5+t6+theta);
-			t10 = exp(t5+t6);
-			t12 = exp(t5+theta);
-			t14 = exp(t6+theta);
-			t15 = t10-t12-t14+t2;
-			t16 = t15*t15;
-			out[j] = t1*t3*t8/t16-2.0*theta*t3*t8/t16/t15*(theta*t10-theta*t14);
-		}
-		else if(*copula==6)
-		{
-			t1 = 1.0-u[j];
-			t2 = pow(t1,1.0*theta);
-			t3 = 1.0-v[j];
-			t4 = pow(t3,1.0*theta);
-			t5 = t2*t4;
-			t6 = t2+t4-t5;
-			t8 = 1/theta-2.0;
-			t9 = pow(t6,1.0*t8);
-			t11 = t2*theta;
-			t12 = 1/t1;
-			t16 = -t11*t12+t11*t12*t4;
-			t19 = theta-1.0;
-			t20 = pow(t1,1.0*t19);
-			t22 = pow(t3,1.0*t19);
-			t23 = theta-1.0+t2+t4-t5;
-			t27 = t9*t20;
-			out[j] = t9*t8*t16/t6*t20*t22*t23-t27*t19*t12*t22*t23+t27*t22*t16;
-		}
-	}
-
-}
-
-
-////////////////////////////////////////////////////////////////////
-//
-// 1. Ableitung von c nach v
-//
-////////////////////////////////////////////////////////////////////
-
-void diffPDF_v_mod(double* u, double* v, int* n, double* param, int* copula, double* out)
-{
-  double* negv;
-  double* negu;
-  double* nparam;
-  negv = (double *) malloc(*n*sizeof(double));
-  negu = (double *) malloc(*n*sizeof(double));
-  nparam = (double *) malloc(2*sizeof(double));
-  int ncopula, i;
-  nparam[0]=-param[0];
-  nparam[1]=-param[1];
-
-if((*copula==43))
-	{
-		ncopula=3;
-		if(param[0] > 0){
-			  nparam[0]=2*(param[0])/(1-param[0]);
-		diffPDF_u(v, u, n, nparam, &ncopula, out);
-		}else{
-			nparam[0]=-2*(param[0])/(1+param[0]);
-			for (i = 0; i < *n; ++i) {negv[i] = 1 - v[i];}
-			diffPDF_u(negv, u, n, nparam, &ncopula, out);
-			for(i=0;i<*n;i++){out[i]=-out[i];}
-		}
-	}else if((*copula==44))
-	{
-		ncopula=4;
-		if(param[0] > 0){
-			nparam[0]=1/(1-param[0]);
-		diffPDF_u(v, u, n, nparam, &ncopula, out);
-		}else{
-			nparam[0]=1/(1+param[0]);
-			for (i = 0; i < *n; ++i) {negv[i] = 1 - v[i];}
-			diffPDF_u(negv, u, n, nparam, &ncopula, out);
-			for(i=0;i<*n;i++){out[i]=-out[i];}
-		}
-	}else{
-  if(((*copula==23) | (*copula==24) | (*copula==26) | (*copula==27) | (*copula==28) | (*copula==29) | (*copula==30)))	// 90° rotated copulas
-    {
-	  ncopula = (*copula)-20;
-      for (i = 0; i < *n; ++i) {negv[i] = 1 - v[i];}
-	  diffPDF_u(negv, u, n, nparam, &ncopula, out);
-	  for(i=0;i<*n;i++){out[i]=-out[i];}
-    }
-  else if(((*copula==33) | (*copula==34) | (*copula==36) | (*copula==37) | (*copula==38) | (*copula==39) | (*copula==40)))	// 270° rotated copulas
-    {
-	  ncopula = (*copula)-30;
-      for (i = 0; i < *n; ++i) {negu[i] = 1 - u[i];}
-	  diffPDF_u(v, negu, n, nparam, &ncopula, out);
-	  //for(i=0;i<*n;i++){out[i]=-out[i];}
-    }
-  else if(((*copula==13) | (*copula==14) | (*copula==16) | (*copula==17) | (*copula==18) | (*copula==19) | (*copula==20)))	// 180° rotated copulas
-	{
-		ncopula = (*copula)-10;
-		for (i = 0; i < *n; ++i) 
-		{
-			negv[i] = 1 - v[i];
-			negu[i] = 1 - u[i];
-		}
-		diffPDF_u(negv, negu, n, param, &ncopula, out);
-		for(i=0;i<*n;i++){out[i]=-out[i];}
-	}
-  else 
-	{
-		diffPDF_u(v, u, n, param, copula, out);
-	}
-	}
-  free(negv);
-  free(negu);
-  free(nparam);
-}
-
+/*
+** deriv.c - C code of the package CDRVine  
+** 
+** by Ulf Schepsmeier
+** 
+** 
+**
+*/
+
+#include "include/vine.h"
+#include "include/deriv.h"
+#include "include/tcopuladeriv.h"
+#include "include/tcopuladeriv_new.h"
+
+#define UMAX  1-1e-10
+
+#define UMIN  1e-10
+
+#define XEPS 1e-4
+
+
+
+/////////////////////////////////////////////////////////////
+//
+// Ableitung der Copula nach dem Parameter
+//
+/////////////////////////////////////////////////////////////
+
+void diffPDF_mod(double* u, double* v, int* n, double* param, int* copula, double* out)
+{
+  double* negv;
+  double* negu;
+  double* nparam;
+  negv = (double *) malloc(*n*sizeof(double));
+  negu = (double *) malloc(*n*sizeof(double));
+  nparam = (double *) malloc(2*sizeof(double));
+  int ncopula;
+  nparam[0]=-param[0];
+  nparam[1]=-param[1];
+  int i;
+
+if((*copula)==43)
+	{
+		ncopula=3;
+		if(param[0] > 0){
+			nparam[0]=2*(param[0])/(1-param[0]);
+			diffPDF(u, v, n, nparam, &ncopula, out);
+			for(i=0;i<*n;i++){out[i]=out[i]*2/pow(1-param[0],2);}
+		}else{
+			nparam[0]=-2*(param[0])/(1+param[0]);
+			for (i = 0; i < *n; ++i) {negv[i] = 1 - v[i];}
+			diffPDF(u, negv, n, nparam, &ncopula, out);
+			for(i=0;i<*n;i++){out[i]=-out[i]*2/pow(1+param[0],2); }
+		}
+	}else if((*copula)==44)
+	{
+		ncopula=4;
+		if(param[0] > 0){
+			nparam[0]=1/(1-param[0]);
+			diffPDF(u, v, n, nparam, &ncopula, out);
+			for(i=0;i<*n;i++){out[i]=out[i]/pow(1-param[0],2);}
+		}else{
+			nparam[0]=1/(1+param[0]);
+			for (i = 0; i < *n; ++i) {negv[i] = 1 - v[i];}
+			diffPDF(u, negv, n, nparam, &ncopula, out);
+			for(i=0;i<*n;i++){out[i]=-out[i]/pow(1+param[0],2); }
+		}
+	}else{
+
+  if(((*copula==23) | (*copula==24) | (*copula==26) | (*copula==27) | (*copula==28) | (*copula==29) | (*copula==30)))	// 90? rotated copulas
+    {
+	  ncopula = (*copula)-20;
+      for (i = 0; i < *n; ++i) {negv[i] = 1 - v[i];}
+	  diffPDF(u, negv, n, nparam, &ncopula, out);
+	  for(i=0;i<*n;i++){out[i]=-out[i];}
+    }
+  else if(((*copula==33) | (*copula==34) | (*copula==36) | (*copula==37) | (*copula==38) | (*copula==39) | (*copula==40)))	// 270? rotated copulas
+    {
+	  ncopula = (*copula)-30;
+      for (i = 0; i < *n; ++i) {negu[i] = 1 - u[i];}
+	  diffPDF(negu, v, n, nparam, &ncopula, out);
+	  for(i=0;i<*n;i++){out[i]=-out[i];}
+    }
+  else if(((*copula==13) | (*copula==14) | (*copula==16) | (*copula==17) | (*copula==18) | (*copula==19) | (*copula==20)))	// 180? rotated copulas
+	{
+		ncopula = (*copula)-10;
+		for (i = 0; i < *n; ++i) 
+		{
+			negv[i] = 1 - v[i];
+			negu[i] = 1 - u[i];
+		}
+		diffPDF(negu, negv, n, param, &ncopula, out);
+	}
+  else 
+	{
+		diffPDF(u, v, n, param, copula, out);
+	}
+	}
+  free(negv);
+  free(negu);
+  free(nparam);
+}
+
+
+
+
+void diffPDF(double* u, double* v, int* n, double* param, int* copula, double* out)
+{
+	int j;
+	double t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t24, t26, t27, t28, t29, t30, t32, t33, t34, t35, t36;
+	t3=0;
+	t4=0;
+
+	double theta = param[0];
+	//double delta = param[1];
+
+	for(j=0;j<*n;j++)
+	{
+		if(*copula==0)
+		{
+			out[j]=0;
+		}
+		else if(*copula==1)
+		{
+			t1 = qnorm(u[j],0.0,1.0,1,0); 
+			t2 = qnorm(v[j],0.0,1.0,1,0);
+			t4 = t1*t1;
+			t5 = t2*t2;
+			t3 = t4+t5;
+			t7 = theta*theta;
+			t8 = 1.0-t7;
+			t9 = 1/t8/2.0;
+			t15 = t7*t3-2.0*theta*t1*t2;
+			t22 = exp(-t15*t9);
+			t24 = sqrt(t8);
+			out[j] = (-2.0*(theta*t3-t1*t2)*t9-t15/(t8*t8)*theta)*t22/t24+t22/t24/t8*theta;
+		}
+		else if(*copula==3)
+		{
+			t1 = u[j]*v[j];
+			t2 = -theta-1.0;
+			t3 = pow(t1,1.0*t2);
+			t4 = pow(u[j],-1.0*theta);
+			t5 = pow(v[j],-1.0*theta);
+			t6 = t4+t5-1.0;
+			t7 = -2.0-1/theta;
+			t8 = pow(t6,1.0*t7);
+			t9 = -t2*t3;
+			t10 = log(t1);
+			t11 = theta*theta;
+			t12 = log(t6);
+			t13 = log(u[j]);
+			t14 = log(v[j]);
+			out[j] = t3*t8-t9*t10*t8+t9*t8*(1/t11*t12+t7*(-t4*t13-t5*t14)/t6);
+		}
+		else if(*copula==4)
+		{
+			t3 = log(u[j]);
+			  t4 = pow(-t3,1.0*theta);
+			  t5 = log(v[j]);
+			  t6 = pow(-t5,1.0*theta);
+			  t7 = t4+t6;
+			  t8 = 1/theta;
+			  t9 = pow(t7,1.0*t8);
+			  t10 = theta*theta;
+			  t12 = log(t7);
+			  t13 = 1/t10*t12;
+			  t14 = log(-t3);
+			  t16 = log(-t5);
+			  t18 = t4*t14+t6*t16;
+			  t20 = 1/t7;
+			  t22 = -t13+t8*t18*t20;
+			  t24 = exp(-t9);
+			  t26 = t24/u[j];
+			  t28 = 1/v[j];
+			  t29 = -1.0+t8;
+			  t30 = pow(t7,2.0*t29);
+			  t32 = t3*t5;
+			  t33 = theta-1.0;
+			  t34 = pow(t32,1.0*t33);
+			  t35 = pow(t7,-1.0*t8);
+			  t36 = t33*t35;
+			  t17 = 1.0+t36;
+			  t15 = t34*t17;
+			  t11 = t26*t28;
+			  t2 = t30*t34;
+			  t1 = log(t32);
+			  out[j] = -t9*t22*t26*t28*t30*t15+t11*t30*(-2.0*t13+2.0*t29*t18*t20)*t15+t11*
+					t2*t1*t17+t11*t2*(t35-t36*t22);
+
+		}
+		else if(*copula==5)
+		{
+			t2 = exp(theta);
+			t3 = t2-1.0;
+			t4 = theta*v[j];
+			t5 = theta*u[j];
+			t7 = exp(t4+t5+theta);
+			t10 = exp(t4+t5);
+			t12 = exp(t4+theta);
+			t14 = exp(t5+theta);
+			t15 = t10-t12-t14+t2;
+			t16 = t15*t15;
+			t17 = 1/t16;
+			t21 = theta*t3;
+			out[j] = t3*t7*t17+theta*t2*t7*t17+t21*(v[j]+u[j]+1.0)*t7*t17-2.0*t21*t7/t15/t16*((v[j]+u[j])*t10-(v[j]+1.0)*t12-(u[j]+1.0)*t14+t2);
+		}
+		else if(*copula==6)
+		{
+			t1 = 1.0-u[j];
+			t2 = pow(t1,1.0*theta);
+			t3 = 1.0-v[j];
+			t4 = pow(t3,1.0*theta);
+			t5 = t2*t4;
+			t6 = t2+t4-t5;
+			t8 = 1/theta-2.0;
+			t9 = pow(t6,1.0*t8);
+			t10 = theta*theta;
+			t11 = log(t6);
+			t12 = log(t1);
+			t13 = t2*t12;
+			t14 = log(t3);
+			t15 = t4*t14;
+			t16 = t13*t4;
+			t19 = t5*t14;
+			t21 = theta-1.0;
+			t27 = pow(t1,1.0*t21);
+			t28 = pow(t3,1.0*t21);
+			t30 = theta-1.0+t2+t4-t5;
+			t33 = t9*t27;
+			out[j] = t9*(-1/t10*t11+t8*(t13+t15-t16-t19)/t6)*t27*t28*t30+t33*t12*t28*t30
+					+t33*t28*t14*t30+t33*t28*(1.0+t13+t15-t16-t19);
+		}
+
+	}
+
+}
+
+
+////////////////////////////////////////////////////////////////////
+//
+// 1. Ableitung von c nach u
+//
+////////////////////////////////////////////////////////////////////
+
+void diffPDF_u_mod(double* u, double* v, int* n, double* param, int* copula, double* out)
+{
+  double* negv;
+  double* negu;
+  double* nparam;
+  negv = (double *) malloc(*n*sizeof(double));
+  negu = (double *) malloc(*n*sizeof(double));
+  nparam = (double *) malloc(2*sizeof(double));
+  int ncopula, i;
+  nparam[0]=-param[0];
+  nparam[1]=-param[1];
+
+if((*copula)==43)
+	{
+		ncopula=3;
+		if(param[0] > 0){
+			nparam[0]=2*(param[0])/(1-param[0]);
+			diffPDF_u(u, v, n, nparam, &ncopula, out);
+		}else{
+			nparam[0]=-2*(param[0])/(1+param[0]);
+			for (i = 0; i < *n; ++i) {negv[i] = 1 - v[i];}
+			diffPDF_u(u, negv, n, nparam, &ncopula, out);
+			//for(i=0;i<*n;i++){out[i]=-out[i];}
+		}
+	}else if((*copula)==44)
+	{
+		ncopula=4;
+		if(param[0] > 0){
+			nparam[0]=1/(1-param[0]);
+			diffPDF_u(u, v, n, nparam, &ncopula, out);
+		}else{
+			nparam[0]=1/(1+param[0]);
+			for (i = 0; i < *n; ++i) {negv[i] = 1 - v[i];}
+			diffPDF_u(u, negv, n, nparam, &ncopula, out);
+			//for(i=0;i<*n;i++){out[i]=-out[i];}
+		}
+	}else{
+
+  if(((*copula==23) | (*copula==24) | (*copula==26) | (*copula==27) | (*copula==28) | (*copula==29) | (*copula==30)))	// 90? rotated copulas
+    {
+	  ncopula = (*copula)-20;
+      for (i = 0; i < *n; ++i) {negv[i] = 1 - v[i];}
+	  diffPDF_u(u, negv, n, nparam, &ncopula, out);
+	  //for(i=0;i<*n;i++){out[i]=-out[i];}
+    }
+  else if(((*copula==33) | (*copula==34) | (*copula==36) | (*copula==37) | (*copula==38) | (*copula==39) | (*copula==40)))	// 270? rotated copulas
+    {
+	  ncopula = (*copula)-30;
+      for (i = 0; i < *n; ++i) {negu[i] = 1 - u[i];}
+	  diffPDF_u(negu, v, n, nparam, &ncopula, out);
+	  for(i=0;i<*n;i++){out[i]=-out[i];}
+    }
+  else if(((*copula==13) | (*copula==14) | (*copula==16) | (*copula==17) | (*copula==18) | (*copula==19) | (*copula==20)))	// 180? rotated copulas
+	{
+		ncopula = (*copula)-10;
+		for (i = 0; i < *n; ++i) 
+		{
+			negv[i] = 1 - v[i];
+			negu[i] = 1 - u[i];
+		}
+		diffPDF_u(negu, negv, n, param, &ncopula, out);
+		for(i=0;i<*n;i++){out[i]=-out[i];}
+	}
+  else 
+	{
+		diffPDF_u(u, v, n, param, copula, out);
+	}
+	}
+  free(negv);
+  free(negu);
+  free(nparam);
+}
+
+void diffPDF_u(double* u, double* v, int* n, double* param, int* copula, double* out)
+{
+	int j, k=1;
+	double t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t18, t19, t20, t21, t22, t23, t24, t25, t27, t28, t29;
+	double t30, t33, t36;
+
+	double theta = param[0];
+	//double delta = param[1];
+
+	for(j=0;j<*n;j++)
+	{
+		if(*copula==0)
+		{
+			out[j]=0;
+		}
+		else if(*copula==1)
+		{
+			t1 = qnorm(u[j],0.0,1.0,1,0); 
+			t2 = qnorm(v[j],0.0,1.0,1,0);
+			t3 = theta*theta;
+			t4 = 1.0-t3;
+			t5 = sqrt(t4);
+			t6 = pow(t1,2.0);
+			t7 = pow(t2,2.0);
+			t8 = t3*(t6+t7)-(2.0*theta*t1*t2);
+			t9 = exp(-t8/t4/2.0);
+			t10 = t9/t5;
+			t11 = sqrt(2.0*pi);
+			t12 = exp(-t6/2.0);
+			t13 = t11/t12;
+			out[j] = -t10*(theta*t13/t4)*(theta*t1-t2);
+		}
+		else if(*copula==2)
+		{
+			diffPDF_u_tCopula_new(&u[j], &v[j], &k, param, copula, &out[j]);
+		}
+		else if(*copula==3)
+		{
+			t1 = 1.0+theta;
+			t3 = pow(u[j]*v[j],-1.0*t1);
+			t4 = t1*t3;
+			t5 = 1/u[j];
+			t7 = pow(u[j],-1.0*theta);
+			t8 = pow(v[j],-1.0*theta);
+			t9 = t7+t8-1.0;
+			t11 = -2.0-1/theta;
+			t12 = pow(t9,1.0*t11);
+			out[j] = -t4*t1*t5*t12-t4*t12*t11*t7*theta*t5/t9;
+		}
+		else if(*copula==4)
+		{
+			t3 = log(u[j]);
+			t4 = pow(-t3,1.0*theta);
+			t5 = log(v[j]);
+			t6 = pow(-t5,1.0*theta);
+			t7 = t4+t6;
+			t8 = 1/theta;
+			t9 = pow(t7,1.0*t8);
+			t11 = u[j]*u[j];
+			t12 = 1/t11;
+			t13 = 1/t3;
+			t15 = 1/t7;
+			t18 = exp(-t9);
+			t19 = 1/v[j];
+			t21 = -1.0+t8;
+			t22 = pow(t7,2.0*t21);
+			t24 = theta-1.0;
+			t25 = pow(t3*t5,1.0*t24);
+			t27 = pow(t7,-1.0*t8);
+			t28 = t24*t27;
+			t29 = 1.0+t28;
+			t30 = t22*t25*t29;
+			t33 = t18*t12;
+			t36 = t19*t22;
+			out[j] = -t9*t4*t12*t13*t15*t18*t19*t30-t33*t19*t30+2.0*t33*t36*t21*t4*theta
+					*t13*t15*t25*t29+t33*t36*t25*t24*t13*t29-t33*t36*t25*t28*t4*t13*t15;
+		}
+		else if(*copula==5)
+		{
+			t1 = theta*theta;
+			t2 = exp(theta);
+			t3 = t2-1.0;
+			t5 = theta*v[j];
+			t6 = theta*u[j];
+			t8 = exp(t5+t6+theta);
+			t10 = exp(t5+t6);
+			t12 = exp(t5+theta);
+			t14 = exp(t6+theta);
+			t15 = t10-t12-t14+t2;
+			t16 = t15*t15;
+			out[j] = t1*t3*t8/t16-2.0*theta*t3*t8/t16/t15*(theta*t10-theta*t14);
+		}
+		else if(*copula==6)
+		{
+			t1 = 1.0-u[j];
+			t2 = pow(t1,1.0*theta);
+			t3 = 1.0-v[j];
+			t4 = pow(t3,1.0*theta);
+			t5 = t2*t4;
+			t6 = t2+t4-t5;
+			t8 = 1/theta-2.0;
+			t9 = pow(t6,1.0*t8);
+			t11 = t2*theta;
+			t12 = 1/t1;
+			t16 = -t11*t12+t11*t12*t4;
+			t19 = theta-1.0;
+			t20 = pow(t1,1.0*t19);
+			t22 = pow(t3,1.0*t19);
+			t23 = theta-1.0+t2+t4-t5;
+			t27 = t9*t20;
+			out[j] = t9*t8*t16/t6*t20*t22*t23-t27*t19*t12*t22*t23+t27*t22*t16;
+		}
+	}
+
+}
+
+
+////////////////////////////////////////////////////////////////////
+//
+// 1. Ableitung von c nach v
+//
+////////////////////////////////////////////////////////////////////
+
+void diffPDF_v_mod(double* u, double* v, int* n, double* param, int* copula, double* out)
+{
+  double* negv;
+  double* negu;
+  double* nparam;
+  negv = (double *) malloc(*n*sizeof(double));
+  negu = (double *) malloc(*n*sizeof(double));
+  nparam = (double *) malloc(2*sizeof(double));
+  int ncopula, i;
+  nparam[0]=-param[0];
+  nparam[1]=-param[1];
+
+if((*copula)==43)
+	{
+		ncopula=3;
+		if(param[0] > 0){
+			  nparam[0]=2*(param[0])/(1-param[0]);
+		diffPDF_u(v, u, n, nparam, &ncopula, out);
+		}else{
+			nparam[0]=-2*(param[0])/(1+param[0]);
+			for (i = 0; i < *n; ++i) {negv[i] = 1 - v[i];}
+			diffPDF_u(negv, u, n, nparam, &ncopula, out);
+			for(i=0;i<*n;i++){out[i]=-out[i];}
+		}
+	}else if((*copula)==44)
+	{
+		ncopula=4;
+		if(param[0] > 0){
+			nparam[0]=1/(1-param[0]);
+		diffPDF_u(v, u, n, nparam, &ncopula, out);
+		}else{
+			nparam[0]=1/(1+param[0]);
+			for (i = 0; i < *n; ++i) {negv[i] = 1 - v[i];}
+			diffPDF_u(negv, u, n, nparam, &ncopula, out);
+			for(i=0;i<*n;i++){out[i]=-out[i];}
+		}
+	}else{
+  if(((*copula==23) | (*copula==24) | (*copula==26) | (*copula==27) | (*copula==28) | (*copula==29) | (*copula==30)))	// 90? rotated copulas
+    {
+	  ncopula = (*copula)-20;
+      for (i = 0; i < *n; ++i) {negv[i] = 1 - v[i];}
+	  diffPDF_u(negv, u, n, nparam, &ncopula, out);
+	  for(i=0;i<*n;i++){out[i]=-out[i];}
+    }
+  else if(((*copula==33) | (*copula==34) | (*copula==36) | (*copula==37) | (*copula==38) | (*copula==39) | (*copula==40)))	// 270? rotated copulas
+    {
+	  ncopula = (*copula)-30;
+      for (i = 0; i < *n; ++i) {negu[i] = 1 - u[i];}
+	  diffPDF_u(v, negu, n, nparam, &ncopula, out);
+	  //for(i=0;i<*n;i++){out[i]=-out[i];}
+    }
+  else if(((*copula==13) | (*copula==14) | (*copula==16) | (*copula==17) | (*copula==18) | (*copula==19) | (*copula==20)))	// 180? rotated copulas
+	{
+		ncopula = (*copula)-10;
+		for (i = 0; i < *n; ++i) 
+		{
+			negv[i] = 1 - v[i];
+			negu[i] = 1 - u[i];
+		}
+		diffPDF_u(negv, negu, n, param, &ncopula, out);
+		for(i=0;i<*n;i++){out[i]=-out[i];}
+	}
+  else 
+	{
+		diffPDF_u(v, u, n, param, copula, out);
+	}
+	}
+  free(negv);
+  free(negu);
+  free(nparam);
+}
+

Modified: pkg/src/deriv2.c
===================================================================
--- pkg/src/deriv2.c	2014-03-26 15:18:51 UTC (rev 63)
+++ pkg/src/deriv2.c	2014-04-22 13:49:04 UTC (rev 64)
@@ -1,1341 +1,1341 @@
-/*
-** deriv2.c - C code of the package CDRVine  
-** 
-** by Ulf Schepsmeier
-** 
-** Second derivatives of c (density)
-**
-*/
-
-#include "include/vine.h"
-#include "include/likelihood.h"
-#include "include/deriv.h"
-#include "include/deriv2.h"
-#include "include/tcopuladeriv.h"
-#include "include/tcopuladeriv_new.h"
-
-#define UMAX  1-1e-10
-
-#define UMIN  1e-10
-
-#define XEPS 1e-4
-
-
-////////////////////////////////////////////////////////////////////
-//
-// 2. Ableitung von c nach dem Parameter
-//
-////////////////////////////////////////////////////////////////////
-
-void diff2PDF_mod(double* u, double* v, int* n, double* param, int* copula, double* out)
-{
-  double* negv;
-  double* negu;
-  double* nparam;
-  double* out2;
-  negv = (double *) malloc(*n*sizeof(double));
-  negu = (double *) malloc(*n*sizeof(double));
-  nparam = (double *) malloc(2*sizeof(double));
-  out2 = (double *) malloc(*n*sizeof(double));
-  int ncopula, i;
-  nparam[0]=-param[0];
-  nparam[1]=-param[1];
-
-if((*copula==43))
-	{
-		ncopula=3;
-		if(param[0] > 0){
-			nparam[0]=2*(param[0])/(1-param[0]);
-			diff2PDF(u, v, n, nparam, &ncopula, out);
-			diffPDF(u, v, n, nparam, &ncopula, out2);
-			for(i=0;i<*n;i++){out[i]=out[i]*4/pow(1-param[0],4)+out2[i]*4/pow(1-param[0],3);}
-		}else{
-			nparam[0]=-2*(param[0])/(1+param[0]);
-			for (i = 0; i < *n; ++i) {negv[i] = 1 - v[i];}
-			diff2PDF(u, negv, n, nparam, &ncopula, out);
-			diffPDF(u, negv, n, nparam, &ncopula, out2);
-			for(i=0;i<*n;i++){out[i]=out[i]*4/pow(1+param[0],4)+out2[i]*4/pow(1+param[0],3);}
-		}
-	}else if((*copula==44))
-	{
-		ncopula=4;
-		if(param[0] > 0){
-			nparam[0]=1/(1-param[0]);
-			diff2PDF(u, v, n, nparam, &ncopula, out);
-			diffPDF(u, v, n, nparam, &ncopula, out2);
-			for(i=0;i<*n;i++){out[i]=out[i]/pow(1-param[0],4)+out2[i]*2/pow(1-param[0],3);}
-		}else{
-			nparam[0]=1/(1+param[0]);
-			for (i = 0; i < *n; ++i) {negv[i] = 1 - v[i];}
-			diff2PDF(u, negv, n, nparam, &ncopula, out);
-			diffPDF(u, negv, n, nparam, &ncopula, out2);
-			for(i=0;i<*n;i++){out[i]=out[i]/pow(1+param[0],4)+out2[i]*2/pow(1+param[0],3);}
-		}
-	}else{
-  if(((*copula==23) | (*copula==24) | (*copula==26) | (*copula==27) | (*copula==28) | (*copula==29) | (*copula==30)))	// 90° rotated copulas
-    {
-	  ncopula = (*copula)-20;
-      for (i = 0; i < *n; ++i) {negv[i] = 1 - v[i];}
-	  diff2PDF(u, negv, n, nparam, &ncopula, out);
-	  //for(i=0;i<*n;i++){out[i]=-out[i];}
-    }
-  else if(((*copula==33) | (*copula==34) | (*copula==36) | (*copula==37) | (*copula==38) | (*copula==39) | (*copula==40)))	// 270° rotated copulas
-    {
-	  ncopula = (*copula)-30;
-      for (i = 0; i < *n; ++i) {negu[i] = 1 - u[i];}
-	  diff2PDF(negu, v, n, nparam, &ncopula, out);
-	  //for(i=0;i<*n;i++){out[i]=-out[i];}
-    }
-  else if(((*copula==13) | (*copula==14) | (*copula==16) | (*copula==17) | (*copula==18) | (*copula==19) | (*copula==20)))	// 180° rotated copulas
-	{
-		ncopula = (*copula)-10;
-		for (i = 0; i < *n; ++i) 
-		{
-			negv[i] = 1 - v[i];
-			negu[i] = 1 - u[i];
-		}
-		diff2PDF(negu, negv, n, param, &ncopula, out);
-	}
-  else 
-	{
-		diff2PDF(u, v, n, param, copula, out);
-	}
-	}
-  free(negv);
-  free(negu);
-  free(nparam);
-  free(out2);
-}
-
-
-void diff2PDF(double* u, double* v, int* n, double* param, int* copula, double* out)
-{
-	int j;
-	double t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29;
-	double t30, t31, t32, t33, t34, t35, t36, t37, t38, t39, t40, t41, t42, t43, t44, t47, t48, t49, t51, t53, t56, t58, t59, t60, t61, t62, t65, t66;
-	double t67, t70, t74, t75, t80, t87, t88;
-
-	double theta = param[0];
-	//double delta = param[1];
-
-	for(j=0;j<*n;j++)
-	{
-		if(*copula==0)
-		{
-			out[j]=0;
-		}
-		else if(*copula==1)
-		{
-			t6 = qnorm(u[j],0.0,1.0,1,0); 
-			t7 = qnorm(v[j],0.0,1.0,1,0);
-			t1 = t6*t7;
-			t2 = theta*theta;
-			t3 = 1.0-t2;
-			t4 = 4.0*t3*t3;
-			t5 = 1/t4;
-			t12 = t6*t6;
-			t13 = t7*t7;
-			t14 = 2.0*theta*t6*t7-t12-t13;
-			t21 = t14*t5;
-			t26 = 1/t3/2.0;
-			t29 = exp(t12/2.0+t13/2.0+t14*t26);
-			t31 = sqrt(t3);
-			t32 = 1/t31;
-			t38 = 2.0*t1*t26+4.0*t21*theta;
-			t39 = t38*t38;
-			t44 = 1/t31/t3;
-			t48 = t3*t3;
-			out[j] = (16.0*t1*t5*theta+16.0*t14/t4/t3*t2+4.0*t21)*t29*t32+t39*t29*t32+2.0*
-					t38*t29*t44*theta+3.0*t29/t31/t48*t2+t29*t44;
-		}
-		else if(*copula==3)
-		{
-			t1 = u[j]*v[j];
-			t2 = -theta-1.0;
-			t3 = pow(t1,1.0*t2);
-			t4 = log(t1);
-			t6 = pow(u[j],-1.0*theta);
-			t7 = pow(v[j],-1.0*theta);
-			t8 = t6+t7-1.0;
-			t10 = -2.0-1/theta;
-			t11 = pow(t8,1.0*t10);
-			t15 = theta*theta;
-			t16 = 1/t15;
-			t17 = log(t8);
-			t19 = log(u[j]);
-			t21 = log(v[j]);
-			t24 = -t6*t19-t7*t21;
-			t26 = 1/t8;
-			t27 = t16*t17+t10*t24*t26;
-			t30 = -t2*t3;
-			t32 = t4*t4;
-			t14 = t27*t27;
-			t13 = t19*t19;
-			t12 = t21*t21;
-			t9 = t24*t24;
-			t5 = t8*t8;
-			out[j] = -2.0*t3*t4*t11+2.0*t3*t11*t27+t30*t32*t11-2.0*t30*t4*t11*t27+t30*
-					t11*t14+t30*t11*(-2.0/t15/theta*t17+2.0*t16*t24*t26+t10*(t6*t13+t7*t12)*t26-t10*t9/t5);
-		}
-		else if(*copula==4)
-		{
-			t3 = log(u[j]);
-			t4 = pow(-t3,1.0*theta);
-			t5 = log(v[j]);
-			t6 = pow(-t5,1.0*theta);
-			t7 = t4+t6;
-			t8 = 1/theta;
-			t9 = pow(t7,1.0*t8);
-			t10 = theta*theta;
-			t11 = 1/t10;
-			t12 = log(t7);
-			t13 = t11*t12;
-			t14 = log(-t3);
-			t16 = log(-t5);
-			t18 = t4*t14+t6*t16;
-			t20 = 1/t7;
-			t22 = -t13+t8*t18*t20;
-			t23 = t22*t22;
-			t25 = exp(-t9);
-			t27 = t25/u[j];
-			t29 = 1/v[j];
-			t30 = -1.0+t8;
-			t31 = pow(t7,2.0*t30);
-			t32 = t29*t31;
-			t33 = t3*t5;
-			t34 = theta-1.0;
-			t35 = pow(t33,1.0*t34);
-			t36 = pow(t7,-1.0*t8);
-			t37 = t34*t36;
-			t38 = 1.0+t37;
-			t39 = t35*t38;
-			t40 = t32*t39;
-			t44 = 1/t10/theta*t12;
-			t47 = t11*t18*t20;
-			t49 = t14*t14;
-			t51 = t16*t16;
-			t53 = t4*t49+t6*t51;
-			t56 = t18*t18;
-			t58 = t7*t7;
-			t59 = 1/t58;
-			t61 = 2.0*t44-2.0*t47+t8*t53*t20-t8*t56*t59;
-			t65 = t9*t9;
-			t70 = t9*t22*t27;
-			t74 = -2.0*t13+2.0*t30*t18*t20;
-			t75 = t74*t35;
-			t80 = log(t33);
-			t87 = t36-t37*t22;
-			t88 = t35*t87;
-			t17 = t27*t29;
-			t15 = t74*t74;
-			t2 = t31*t35;
-			t1 = t80*t80;
-			out[j] = -t9*t23*t27*t40-t9*t61*t27*t40+t65*t23*t27*t40-2.0*t70*t32*t75*t38
-				-2.0*t70*t32*t35*t80*t38-2.0*t70*t32*t88+t17*t31*t15*t39+t17*t31*(4.0*t44-4.0*
-				t47+2.0*t30*t53*t20-2.0*t30*t56*t59)*t39+2.0*t27*t32*t75*t80*t38+2.0*t17*t31*
-				t74*t88+t17*t2*t1*t38+2.0*t17*t2*t80*t87+t17*t2*(-2.0*t36*t22+t37*t23-
-				t37*t61);
-
-		}
-		else if(*copula==5)
-		{
-			t1 = exp(theta);
-			t2 = theta*v[j];
-			t3 = theta*u[j];
-			t5 = exp(t2+t3+theta);
-			t8 = exp(t2+t3);
-			t10 = exp(t2+theta);
-			t12 = exp(t3+theta);
-			t13 = t8-t10-t12+t1;
-			t14 = t13*t13;
-			t15 = 1/t14;
-			t18 = t1-1.0;
-			t19 = v[j]+u[j]+1.0;
-			t21 = t5*t15;
-			t26 = 1/t14/t13;
-			t27 = v[j]+u[j];
-			t29 = v[j]+1.0;
[TRUNCATED]

To get the complete diff run:
    svnlook diff /svnroot/vinecopula -r 64


Mehr Informationen über die Mailingliste Vinecopula-commits