aboutsummaryrefslogtreecommitdiff
path: root/src/input/nqip.input.pamphlet
blob: 0136c3acc17a809145585d0d38caac3de27d62e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
\documentclass{article}
\usepackage{axiom}
\begin{document}
\title{\$SPAD/src/input nqip.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

xvals := [0.00,0.04,0.08,0.12,0.22,0.26,0.30,0.38,0.39,0.42,0.45, 
               0.46,0.60,0.68,0.72,0.73,0.83,0.85,0.88,0.90,1.00];

yvals := [4.0000,3.9936,3.9746,3.9432,3.8135,3.7467,3.6697,3.4943,
                 3.4719,3.4002,3.3264,3.3017,2.9412,2.7352,2.6344,
                        2.6094,2.3684,2.3222,2.2543,2.2099,2.0000];

result := nagPolygonIntegrate(xvals,yvals);
result.integral :: Float             

--       3.1414

result.errorEstimate :: Float        

--       - 0.000025627

coords := transpose matrix [xvals, yvals];
result := nagPolygonIntegrate coords;
result.integral :: Float             

--       3.1414

result.errorEstimate :: Float        

--       - 0.000025627

nagPolygonIntegrate([1,2,3],[1,2,3,4])
 
--   Error signalled from user code:
--      The lists supplied to nagPolygonIntegrate are of different 
--      lengths: 3 and 4.

nagPolygonIntegrate([[1,2,3],[4,5,6]])

--   Error signalled from user code:
--      Please supply the coordinate matrix in nagPolygonIntegrate with
--      each row consisting of single a x-y pair.

outputGeneral()

output "End of tests"

@
\eject
\begin{thebibliography}{99}
\bibitem{1} nothing
\end{thebibliography}
\end{document}