TestListOfNumPoly: Difference between revisions

From ApCoCoAWiki
Jbrandt (talk | contribs)
New page: <command> <title>TestListOfNumPoly</title> <short_description>Compares two lists of numerical polynomials</short_description> <syntax> ApCoCoATest.TestNumericalNumber(f: LIST, e: LIST, Eps...
 
Jbrandt (talk | contribs)
mNo edit summary
 
Line 3: Line 3:
<short_description>Compares two lists of numerical polynomials</short_description>
<short_description>Compares two lists of numerical polynomials</short_description>
<syntax>
<syntax>
ApCoCoATest.TestNumericalNumber(f: LIST, e: LIST, Eps: RAT):LIST
ApCoCoATest.TestListOfNumPoly(f: LIST, e: LIST, Eps: RAT):LIST
</syntax>
</syntax>



Latest revision as of 17:51, 12 October 2009

TestListOfNumPoly

Compares two lists of numerical polynomials

Syntax

ApCoCoATest.TestListOfNumPoly(f: LIST, e: LIST, Eps: RAT):LIST

Description

This function compares two lists of numerical polynomials. Every polynomial is tested via the function TestNumPoly. The two lists doesn't have to be sorted, the polynomials may be in any order.

  • @param Found: The first list of numerical polynomials

  • @param Expected: The second list of numerical polynomials

  • @param Eps: The allowed difference between two polynomials

  • @return A list. First entry is a boolean, its value is TRUE, if the test has been passed. If FALSE, the list contains also the two lists.

Example

F := [0.212 x + 2.103 xy, 14.12 x + 0.0001 y, 2z - 0.21 x^2]; E := [2z - 0.24x^2, 0.00001 x^2 + 0.214 x + 2.1 xy, 14.2 x];
ApCoCoATest.TestListOfNumPoly(F,E,0.1);

[TRUE]
-------------------------------