aboutsummaryrefslogtreecommitdiff
path: root/src/input/nepip.input.pamphlet
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2007-08-14 05:14:52 +0000
committerdos-reis <gdr@axiomatics.org>2007-08-14 05:14:52 +0000
commitab8cc85adde879fb963c94d15675783f2cf4b183 (patch)
treec202482327f474583b750b2c45dedfc4e4312b1d /src/input/nepip.input.pamphlet
downloadopen-axiom-ab8cc85adde879fb963c94d15675783f2cf4b183.tar.gz
Initial population.
Diffstat (limited to 'src/input/nepip.input.pamphlet')
-rw-r--r--src/input/nepip.input.pamphlet154
1 files changed, 154 insertions, 0 deletions
diff --git a/src/input/nepip.input.pamphlet b/src/input/nepip.input.pamphlet
new file mode 100644
index 00000000..f92484d8
--- /dev/null
+++ b/src/input/nepip.input.pamphlet
@@ -0,0 +1,154 @@
+\documentclass{article}
+\usepackage{axiom}
+\begin{document}
+\title{\$SPAD/src/input nepip.input}
+\author{The Axiom Team}
+\maketitle
+\begin{abstract}
+\end{abstract}
+\eject
+\tableofcontents
+\eject
+\section{License}
+<<license>>=
+--Copyright The Numerical Algorithms Group Limited 1996.
+@
+<<*>>=
+<<license>>
+
+-- Note that the conversions of results from DoubleFloat to Float
+-- will become unnecessary if outputGeneral is extended to apply to
+-- DoubleFloat quantities.
+
+outputGeneral 5
+
+mA1 := matrix [[ 0.5 , 1.5 , 6.6 , 4.8], _
+ [ 1.5 , 6.5 , 16.2 , 8.6], _
+ [ 6.6 , 16.2 , 37.6 , 9.8], _
+ [ 4.8 , 8.6 , 9.8 , -17.1]];
+
+mB1 := matrix[[ 1 , 3 , 4 , 1], _
+ [ 3 , 13 , 16 , 11], _
+ [ 4 , 16 , 24 , 18], _
+ [ 1 , 11 , 18 , 27]];
+
+mA2 := matrix [[ 3.9 , 12.5 , -34.5 , -0.5], _
+ [ 4.3 , 21.5 , -47.5 , 7.5], _
+ [ 4.3 , 21.5 , -43.5 , 3.5], _
+ [ 4.4 , 26.0 , -46.0 , 6.0]];
+
+mB2 := matrix[[ 1 , 2 , -3 , 1], _
+ [ 1 , 3 , -5 , 4], _
+ [ 1 , 3 , -4 , 3], _
+ [ 1 , 3 , -4 , 4]];
+
+nagEigenvalues(mA1,mB1) :: List Float
+
+-- [- 3.0,- 1.0,2.0,4.0]
+
+vv1 := nagEigenvectors(mA1,mB1);
+(vv1.eigenvalues) :: List Float
+
+-- [- 3.0,- 1.0,2.0,4.0]
+
+(vv1.eigenvectors) :: List Vector Complex Float
+
+-- [[- 4.35,0.05,1.0,- 0.5], [- 2.05,0.15,0.5,- 0.5], [- 3.95,0.85,0.5,- 0.5],
+-- [2.65,0.05,- 1.0,0.5]]
+
+nagEigenvalues(mA2,mB2)
+
+-- all components are O(1) or more so:
+
+% :: List Complex Float
+
+-- [2.0,3.0 + 4.0 %i,3.0 - 4.0 %i,4.0]
+
+vv2 := nagEigenvectors(mA2,mB2);
+vv2.eigenvalues
+
+-- all components are O(1) or more so:
+
+% :: List Complex Float
+
+-- [2.0,3.0 + 4.0 %i,3.0 - 4.0 %i,4.0]
+
+vv2.eigenvectors :: List Vector Complex Float
+
+-- [[0.99606,0.0056917,0.062609,0.062609],
+--
+-- [0.94491, 0.18898 + 0.26077 E -14 %i, 0.11339 - 0.15119 %i,
+-- 0.11339 - 0.15119 %i]
+-- ,
+--
+-- [0.94491, 0.18898 - 0.26077 E -14 %i, 0.11339 + 0.15119 %i,
+-- 0.11339 + 0.15119 %i]
+-- ,
+-- [0.98752,0.010972,- 0.032917,0.15361]]
+
+-- The same call with eps=0.0001:
+
+vv2a := nagEigenvectors(mA2,mB2,0.0001);
+vv2a.eigenvalues :: List Complex Float
+
+-- [1.9989,3.0003 + 3.9994 %i,3.0003 - 3.9994 %i,4.0]
+
+vv2a.eigenvectors :: List Vector Complex Float
+
+-- [[0.99605,0.0057355,0.062656,0.062656],
+--
+-- [0.94491, 0.18899 - 0.000048882 %i, 0.11336 - 0.15119 %i,
+-- 0.11336 - 0.15119 %i]
+-- ,
+--
+-- [0.94491, 0.18899 + 0.000048882 %i, 0.11336 + 0.15119 %i,
+-- 0.11336 + 0.15119 %i]
+-- ,
+-- [0.98751,0.011031,- 0.032912,0.15367]]
+
+mB1(1,1) := -1;
+
+-- The next test should fail on F02ADF then call F02BJF:
+
+nagEigenvalues(mA1,mB1)
+
+-- all components are O(1) or more so:
+
+% :: List Complex Float
+
+-- [3.5016,- 1.5471,0.041212 + 0.21738 %i,0.041212 - 0.21738 %i]
+
+-- Similarly, this should fail on F02AEF then call F02BJF:
+
+vv3 := nagEigenvectors(mA1,mB1);
+vv3.eigenvalues
+
+-- all components are O(1) or more so:
+
+% :: List Complex Float
+
+-- [3.5016,- 1.5471,0.041212 + 0.21738 %i,0.041212 - 0.21738 %i]
+
+vv3.eigenvectors :: List Vector Complex Float
+
+-- [[- 0.034577,0.63045,- 0.75202,0.1892],
+-- [0.17876,- 0.73845,0.047413,0.64845],
+--
+-- [0.80838, - 0.00095133 + 0.47557 %i, - 0.20354 - 0.21737 %i,
+-- 0.15404 + 0.089179 %i]
+-- ,
+--
+-- [0.80838, - 0.00095133 - 0.47557 %i, - 0.20354 + 0.21737 %i,
+-- 0.15404 - 0.089179 %i]
+-- ]
+
+outputGeneral()
+
+output "End of tests"
+
+@
+\eject
+\begin{thebibliography}{99}
+\bibitem{1} nothing
+\end{thebibliography}
+\end{document}