\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} <>= --Copyright The Numerical Algorithms Group Limited 1996. @ <<*>>= <> -- 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}