Michael Somos on Sat, 30 Oct 1999 18:02:43 -0400 (EDT)


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

regression test


Bill Allombert mentioned :

> The number of untested features of PARI is unbelievable.

which is probably a fair statement. For this reason looking at what
other comparable packages do might be helpful. For example, the "calc"
package has an extensive regression test suite which does very detailed
checks on the behavior of the system. This is a several thousand line
script of code which automatically performs lots of tests. The package
is at "ftp://reality.sgi.com/users/chongo/src/calc/calc-stable.tar.gz";.
Aside from the large amount of work required in order to create such a
test script, this can also be done with GP/PARI. I wonder if pieces of
the "regress.cal" could be reused for GP/PARI. After all, pieces like :

        vrfy((3/4)//(-1/4)==-3, '438: (3/4)//(-1/4)==-3');
        vrfy(7%3==1,            '439: 7%3==1');
        vrfy(0-.5==-.5,         '440: 0-.5==-.5');
        vrfy(0^0 == 1,          '441: 0^0 == 1');
        vrfy(0^1 == 0,          '442: 0^1 == 0');
        vrfy(1^0 == 1,          '443: 1^0 == 1');
        vrfy(1^1 == 1,          '444: 1^1 == 1');
        vrfy(1/(.8+.8i)==.625-.625i,    '445: 1/(.8+.8i)==.625-.625i');
        vrfy((.6+.8i)*(3.6-4.8i)==6,    '446: (.6+.8i)*(3.6-4.8i)==6');
        vrfy(-16^-2 == -1/256,  '447: -16^-2 == -1/256');
        vrfy(-7^2 == -49,       '448: -7^2 == -49');
        vrfy(-3! == -6,         '449: -3! == -6');

could be automatically translated into equivalent GP/PARI code. Shalom,
Michael

-- 
Michael Somos <somos@grail.cba.csuohio.edu>     Cleveland State University
http://grail.cba.csuohio.edu/~somos/            Cleveland, Ohio, USA 44115