## Diff of /Trans/trans.pd[be2ca0] .. [591b21]  Maximize  Restore

### Switch to side-by-side view

```--- a/Trans/trans.pd
+++ b/Trans/trans.pd
@@ -1,7 +1,4 @@
-our \$VERSION = '0.12';
-pp_setversion(qq{'\$VERSION'});
-\$VERSION = eval \$VERSION;
-
+our \$VERSION = 0.04;
use PDL::Exporter;

if (\$^O =~ /MSWin/) {
@@ -12,11 +9,6 @@

#include <math.h>
-
-#if defined(PDL_CORE_VERSION) && PDL_CORE_VERSION < 10
-typedef PDL_Long PDL_Indx;
-#endif
-
typedef PDL_Long logical;
typedef PDL_Long integer;
typedef PDL_Long ftnlen;
@@ -92,6 +84,7 @@
');

+pp_setversion(0.04);

use PDL::Func;
@@ -105,8 +98,6 @@
use PDL::LinearAlgebra::Real qw //;
use PDL::LinearAlgebra::Complex qw //;
use strict;
-
-=encoding Latin-1

@@ -259,8 +250,8 @@
//     and set scale = t/2^ns ...

// Compute Infinity norm
-	hnorm = dlange_("I", &(integer){\$PRIV(__n_size)}, &(integer){\$PRIV(__n_size)}, \$P(A),
-			&(integer){\$PRIV(__n_size)}, wsp);
+	hnorm = dlange_("I", &\$PRIV(__n_size), &\$PRIV(__n_size), \$P(A),
+			&\$PRIV(__n_size), wsp);

hnorm = abs(\$scale() * hnorm);
if (hnorm == 0.)
@@ -296,8 +287,8 @@

// ---  H2 = scale2*H*H ...

-		dgemm_("n", "n", &(integer){\$PRIV(__n_size)}, &(integer){\$PRIV(__n_size)}, &(integer){\$PRIV(__n_size)}, &scale2, h__, &(integer){\$PRIV(__n_size)}, h__,
-		    &(integer){\$PRIV(__n_size)}, &c_b7, &coef[ih2], &(integer){\$PRIV(__n_size)}, (ftnlen)1, (ftnlen)1);
+		dgemm_("n", "n", &\$PRIV(__n_size), &\$PRIV(__n_size), &\$PRIV(__n_size), &scale2, h__, &\$PRIV(__n_size), h__,
+		    &\$PRIV(__n_size), &c_b7, &coef[ih2], &\$PRIV(__n_size), (ftnlen)1, (ftnlen)1);

// ---  initialize p (numerator) and q (denominator) ...
cp = coef[\$deg() - 1];
@@ -316,8 +307,8 @@
k = \$deg() - 2;
do{
iused = iodd * iq + (1 - iodd) * ip;
-			dgemm_("n", "n", &(integer){\$PRIV(__n_size)}, &(integer){\$PRIV(__n_size)}, &(integer){\$PRIV(__n_size)}, &c_b11, &wsp[iused], &(integer){\$PRIV(__n_size)}, &coef[ih2], &(integer){\$PRIV(__n_size)}, &c_b7, &
-			    wsp[ifree], &(integer){\$PRIV(__n_size)}, (ftnlen)1, (ftnlen)1);
+			dgemm_("n", "n", &\$PRIV(__n_size), &\$PRIV(__n_size), &\$PRIV(__n_size), &c_b11, &wsp[iused], &\$PRIV(__n_size), &coef[ih2], &\$PRIV(__n_size), &c_b7, &
+			    wsp[ifree], &\$PRIV(__n_size), (ftnlen)1, (ftnlen)1);
for (j = 0; j < \$PRIV(__n_size); j++) {
wsp[ifree + j  * (\$PRIV(__n_size) + 1)] += coef[k];
}
@@ -334,18 +325,18 @@

if (iodd == 1)
{
-			dgemm_("n", "n", &(integer){\$PRIV(__n_size)}, &(integer){\$PRIV(__n_size)}, &(integer){\$PRIV(__n_size)}, &scale, &wsp[iq], &(integer){\$PRIV(__n_size)}, h__, &(integer){\$PRIV(__n_size)}, &
-				c_b7, &wsp[ifree], &(integer){\$PRIV(__n_size)}, (ftnlen)1, (ftnlen)1);
+			dgemm_("n", "n", &\$PRIV(__n_size), &\$PRIV(__n_size), &\$PRIV(__n_size), &scale, &wsp[iq], &\$PRIV(__n_size), h__, &\$PRIV(__n_size), &
+				c_b7, &wsp[ifree], &\$PRIV(__n_size), (ftnlen)1, (ftnlen)1);
iq = ifree;
}
else
{
-			dgemm_("n", "n", &(integer){\$PRIV(__n_size)}, &(integer){\$PRIV(__n_size)}, &(integer){\$PRIV(__n_size)}, &scale, &wsp[ip], &(integer){\$PRIV(__n_size)}, h__, &(integer){\$PRIV(__n_size)}, &
-				c_b7, &wsp[ifree], &(integer){\$PRIV(__n_size)}, (ftnlen)1, (ftnlen)1);
+			dgemm_("n", "n", &\$PRIV(__n_size), &\$PRIV(__n_size), &\$PRIV(__n_size), &scale, &wsp[ip], &\$PRIV(__n_size), h__, &\$PRIV(__n_size), &
+				c_b7, &wsp[ifree], &\$PRIV(__n_size), (ftnlen)1, (ftnlen)1);
ip = ifree;
}
daxpy_(&mm, &c_b19, &wsp[ip], &c__1, &wsp[iq], &c__1);
-		dgesv_(&(integer){\$PRIV(__n_size)}, &(integer){\$PRIV(__n_size)}, &wsp[iq], &(integer){\$PRIV(__n_size)}, ipiv, &wsp[ip], &(integer){\$PRIV(__n_size)}, \$P(info));
+		dgesv_(&\$PRIV(__n_size), &\$PRIV(__n_size), &wsp[iq], &\$PRIV(__n_size), ipiv, &wsp[ip], &\$PRIV(__n_size), \$P(info));

if (\$info() != 0)
{
@@ -369,8 +360,8 @@
for (k = 0; k < i__1; k++) {
iget = iodd * ip + (1 - iodd) * iq;
iput = (1 - iodd) * ip + iodd * iq;
-					dgemm_("n", "n", &(integer){\$PRIV(__n_size)}, &(integer){\$PRIV(__n_size)}, &(integer){\$PRIV(__n_size)}, &c_b11, &wsp[iget], &(integer){\$PRIV(__n_size)}, &wsp[iget], &(integer){\$PRIV(__n_size)}, &c_b7,
-						&wsp[iput], &(integer){\$PRIV(__n_size)}, (ftnlen)1, (ftnlen)1);
+					dgemm_("n", "n", &\$PRIV(__n_size), &\$PRIV(__n_size), &\$PRIV(__n_size), &c_b11, &wsp[iget], &\$PRIV(__n_size), &wsp[iget], &\$PRIV(__n_size), &c_b7,
+						&wsp[iput], &\$PRIV(__n_size), (ftnlen)1, (ftnlen)1);
iodd = 1 - iodd;
}
}
@@ -577,8 +568,8 @@
// ---  scaling: seek ns such that ||t*H/2^ns|| < 1/2;
//     and set scale = t/2^ns ...
// Compute Infinity norm
-	hnorm = zlange_("I", &(integer){\$PRIV(__n_size)}, &(integer){\$PRIV(__n_size)}, &h__[0],
-			&(integer){\$PRIV(__n_size)}, &wsp[0].r);
+	hnorm = zlange_("I", &\$PRIV(__n_size), &\$PRIV(__n_size), &h__[0],
+			&\$PRIV(__n_size), &wsp[0].r);

hnorm = abs(\$scale() * hnorm);
if (hnorm == 0.)
@@ -616,8 +607,8 @@
}

// ---  H2 = scale2*H*H ...
-		    zgemm_("n", "n", &(integer){\$PRIV(__n_size)}, &(integer){\$PRIV(__n_size)}, &(integer){\$PRIV(__n_size)}, &scale2, &h__[0], &(integer){\$PRIV(__n_size)}, &h__[0],
-			    &(integer){\$PRIV(__n_size)}, &c_b1, &wsp[ih2], &(integer){\$PRIV(__n_size)}, (ftnlen)1, (ftnlen)1);
+		    zgemm_("n", "n", &\$PRIV(__n_size), &\$PRIV(__n_size), &\$PRIV(__n_size), &scale2, &h__[0], &\$PRIV(__n_size), &h__[0],
+			    &\$PRIV(__n_size), &c_b1, &wsp[ih2], &\$PRIV(__n_size), (ftnlen)1, (ftnlen)1);

// ---  initialise p (numerator) and q (denominator) ...

@@ -649,8 +640,8 @@
do
{
iused = iodd * iq + (1 - iodd) * ip;
-			    zgemm_("n", "n", &(integer){\$PRIV(__n_size)}, &(integer){\$PRIV(__n_size)}, &(integer){\$PRIV(__n_size)}, &c_b2, &wsp[iused], &(integer){\$PRIV(__n_size)}, &wsp[ih2], &(integer){\$PRIV(__n_size)}, &c_b1, &
-				    wsp[ifree], &(integer){\$PRIV(__n_size)}, (ftnlen)1, (ftnlen)1);
+			    zgemm_("n", "n", &\$PRIV(__n_size), &\$PRIV(__n_size), &\$PRIV(__n_size), &c_b2, &wsp[iused], &\$PRIV(__n_size), &wsp[ih2], &\$PRIV(__n_size), &c_b1, &
+				    wsp[ifree], &\$PRIV(__n_size), (ftnlen)1, (ftnlen)1);
for (j = 0; j < \$PRIV(__n_size); j++) {
i__1 = ifree + j  * (\$PRIV(__n_size) + 1);
i__2 = ifree + j  * (\$PRIV(__n_size) + 1);
@@ -673,19 +664,19 @@

if (iodd != 0)
{
-			zgemm_("n", "n", &(integer){\$PRIV(__n_size)}, &(integer){\$PRIV(__n_size)}, &(integer){\$PRIV(__n_size)}, &scale, &wsp[iq], &(integer){\$PRIV(__n_size)}, &h__[0], &(integer){\$PRIV(__n_size)}, &
-				c_b1, &wsp[ifree], &(integer){\$PRIV(__n_size)}, (ftnlen)1, (ftnlen)1);
+			zgemm_("n", "n", &\$PRIV(__n_size), &\$PRIV(__n_size), &\$PRIV(__n_size), &scale, &wsp[iq], &\$PRIV(__n_size), &h__[0], &\$PRIV(__n_size), &
+				c_b1, &wsp[ifree], &\$PRIV(__n_size), (ftnlen)1, (ftnlen)1);
iq = ifree;
}else
{
-			zgemm_("n", "n", &(integer){\$PRIV(__n_size)}, &(integer){\$PRIV(__n_size)}, &(integer){\$PRIV(__n_size)}, &scale, &wsp[ip], &(integer){\$PRIV(__n_size)}, &h__[0], &(integer){\$PRIV(__n_size)}, &
-				c_b1, &wsp[ifree], &(integer){\$PRIV(__n_size)}, (ftnlen)1, (ftnlen)1);
+			zgemm_("n", "n", &\$PRIV(__n_size), &\$PRIV(__n_size), &\$PRIV(__n_size), &scale, &wsp[ip], &\$PRIV(__n_size), &h__[0], &\$PRIV(__n_size), &
+				c_b1, &wsp[ifree], &\$PRIV(__n_size), (ftnlen)1, (ftnlen)1);
ip = ifree;
}
z__1.r = -1.;
z__1.i = -0.;
zaxpy_(&mm, &z__1, &wsp[ip], &c__1, &wsp[iq], &c__1);
-		    zgesv_(&(integer){\$PRIV(__n_size)}, &(integer){\$PRIV(__n_size)}, &wsp[iq], &(integer){\$PRIV(__n_size)}, ipiv, &wsp[ip], &(integer){\$PRIV(__n_size)}, \$P(info));
+		    zgesv_(&\$PRIV(__n_size), &\$PRIV(__n_size), &wsp[iq], &\$PRIV(__n_size), ipiv, &wsp[ip], &\$PRIV(__n_size), \$P(info));

if (\$info() == 0)
{
@@ -710,8 +701,8 @@
{
iget = iodd * ip + (1 - iodd) * iq;
iput = (1 - iodd) * ip + iodd * iq;
-					zgemm_("n", "n", &(integer){\$PRIV(__n_size)}, &(integer){\$PRIV(__n_size)}, &(integer){\$PRIV(__n_size)}, &c_b2, &wsp[iget], &(integer){\$PRIV(__n_size)}, &wsp[iget], &(integer){\$PRIV(__n_size)}, &c_b1,
-						&wsp[iput], &(integer){\$PRIV(__n_size)}, (ftnlen)1, (ftnlen)1);
+					zgemm_("n", "n", &\$PRIV(__n_size), &\$PRIV(__n_size), &\$PRIV(__n_size), &c_b2, &wsp[iget], &\$PRIV(__n_size), &wsp[iget], &\$PRIV(__n_size), &c_b1,
+						&wsp[iput], &\$PRIV(__n_size), (ftnlen)1, (ftnlen)1);
iodd = 1 - iodd;
}
}
@@ -851,9 +842,9 @@
HV *bless_stash;

pdl *pdl;
-   PDL_Indx odims[1];
-
-   PDL_Indx dims[] = {2,n};
+   PDL_Long odims[1];
+
+   PDL_Long dims[] = {2,n};
pdl = PDL->pdlnew();
PDL->setdims (pdl, dims, 2);
pdl->datatype = PDL_D;
```