TestSortedListOfNumPoly: Difference between revisions

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



Latest revision as of 17:50, 12 October 2009

TestSortedListOfNumPoly

Compares two sorted lists of numerical polynomials

Syntax

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

Description

This function compares two sorted lists of numerical polynomials. Every polynomial is tested via the function TestNumPoly.

  • @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 := [2z - 0.21 x^2, 0.212 x + 2.103 xy, 14.12 x + 0.0001 y]; E := [2z - 0.24x^2, 0.00001 x^2 + 0.214 x + 2.1 xy, 14.2 x];
ApCoCoATest.TestSortedListOfNumPoly(F,E,0.1);

[TRUE]
-------------------------------
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.TestSortedListOfNumPoly(F,E,0.1);

[FALSE, [2103/1000xy + 53/250x, 353/25x + 1/10000y, -21/100x^2 + 2z], [-6/25x^2 + 2z, 1/100000x^2 + 21/10xy + 107/500x, 71/5x]]
-------------------------------