TestListOfNumPoly

From ApCoCoAWiki
Revision as of 17:39, 12 October 2009 by 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...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

TestListOfNumPoly

Compares two lists of numerical polynomials

Syntax

ApCoCoATest.TestNumericalNumber(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]
-------------------------------