| Making verify in build/sunos-5.9-sun4m | ( cd modules && make testsuites ) | | /usr/ccs/bin/m4:-:/home/xenofarm/xenoclient/pike-7.4/buildtmp/Pike7.4-20030122-151319/src/modules/Gmp/testsuite.in:208 | pushed back more than 4096 chars | DOTEST(TRUE,mixed a() { return Gmp.mpz(1.0)<Gmp.mpz(2.0); })
Maybe it's time to do something about the explosive nature of the macro expansions in the Gmp testsuite? I'm pretty sure they generate far more tests than are actually useful anyway.
Well, it's kind of impressive the way all permutations are tested. I have some ideas for optimizations without losing tests, but I'll need some experiment some...
/ Martin Nilsson (Åskblod)
Previous text:
2003-01-22 22:33: Subject: Gmp testsuite
| Making verify in build/sunos-5.9-sun4m | ( cd modules && make testsuites ) | | /usr/ccs/bin/m4:-:/home/xenofarm/xenoclient/pike-7.4/buildtmp/Pike7.4-20030122-151319/src/modules/Gmp/testsuite.in:208 | pushed back more than 4096 chars | DOTEST(TRUE,mixed a() { return Gmp.mpz(1.0)<Gmp.mpz(2.0); })
Maybe it's time to do something about the explosive nature of the macro expansions in the Gmp testsuite? I'm pretty sure they generate far more tests than are actually useful anyway.
/ Marcus Comstedt (ACROSS) (Hail Ilpalazzo!)
Ok. I managed to reduce it from 28795 to 9751 tests without losing any significant tests (perhaps). The modified testsuite however generates quite a few new permutations that doesn't work. They are typically of the type Gmp.mpq(Gmp.mpf(4.0)), which I am uncertain if it should work, and min(Gmp.mpf(2),1.0,Gmp.mpq(3)), which I think should.
Index: testsuite.in =================================================================== RCS file: /pike/data/cvsroot/Pike/7.5/src/modules/Gmp/testsuite.in,v retrieving revision 1.22 diff -c -r1.22 testsuite.in *** testsuite.in 2002/11/26 16:28:23 1.22 --- testsuite.in 2003/01/23 00:13:33 *************** *** 135,213 **** ]])
define([[mpz_test_cmp]],[[ ! cond( [[ master()->resolv("Gmp")->mpz ]], ! [[ ! test_cmp3(Gmp.mpz($1), $2, $3) ! test_cmp3($1, Gmp.mpz($2), $3) ]]) - cond( [[ master()->resolv("Gmp")->mpz ]], - [[ - test_cmp3(Gmp.mpz($1), Gmp.mpz($2), $3) - test_cmp3(Gmp.mpz($1), $2, Gmp.mpz($3)) - ]]) - cond( [[ master()->resolv("Gmp")->mpz ]], - [[ - test_cmp3($1, Gmp.mpz($2), Gmp.mpz($3)) - test_cmp3(Gmp.mpz($1), Gmp.mpz($2), Gmp.mpz($3)) - ]])
! cond( [[ master()->resolv("Gmp")->mpq ]], ! [[ ! test_cmp3(Gmp.mpq($1), $2, $3) ! test_cmp3($1, Gmp.mpq($2), $3) ! ]]) ! cond( [[ master()->resolv("Gmp")->mpq ]], ! [[ ! test_cmp3(Gmp.mpq($1), Gmp.mpq($2), $3) ! test_cmp3(Gmp.mpq($1), $2, Gmp.mpq($3)) ]]) - cond( [[ master()->resolv("Gmp")->mpq ]], - [[ - test_cmp3($1, Gmp.mpq($2), Gmp.mpq($3)) - test_cmp3(Gmp.mpq($1), Gmp.mpq($2), Gmp.mpq($3)) - ]])
! cond( [[ master()->resolv("Gmp")->mpq ]], ! [[ ! test_cmp3(Gmp.mpf($1), $2, $3) ! test_cmp3($1, Gmp.mpf($2), $3) ! ]]) ! cond( [[ master()->resolv("Gmp")->mpq ]], ! [[ ! test_cmp3(Gmp.mpf($1), Gmp.mpf($2), $3) ! test_cmp3(Gmp.mpf($1), $2, Gmp.mpf($3)) ]]) - cond( [[ master()->resolv("Gmp")->mpq ]], - [[ - test_cmp3($1, Gmp.mpf($2), Gmp.mpf($3)) - test_cmp3(Gmp.mpf($1), Gmp.mpf($2), Gmp.mpf($3)) - ]]) - ]]) - - define([[mpz_test_type1]],[[ - mpz_test_cmp($1,$2,$3) - mpz_test_cmp($1.0,$2,$3) - ]]) - - define([[mpz_test_type2]],[[ - mpz_test_type1($1,$2,$3) - mpz_test_type1($1,$2.0,$3) ]])
! define([[mpz_test_type3]],[[ ! mpz_test_type2($1,$2,$3) ! mpz_test_type2($1,$2,$3.0) ]])
! define([[mpz_test_type4]],[[ ! mpz_test_type2($1,$2,$3) ! mpz_test_type2($1,$2,Gmp.mpz($3)) ]])
! mpz_test_type4(1,2,3) ! mpz_test_type4(-2,1,4) ! mpz_test_type4(-2,-1,4)
cond( [[ master()->resolv("Gmp")->mpz ]], [[ --- 135,172 ---- ]])
define([[mpz_test_cmp]],[[ ! cond( [[ master()->resolv("Gmp")->mpz ]],[[ ! test_cmp3($1, Gmp.mpz($2), $3) ! test_cmp3(Gmp.mpz($1), Gmp.mpz($2), Gmp.mpz($3)) ]])
! cond( [[ master()->resolv("Gmp")->mpq ]],[[ ! test_cmp3($1, Gmp.mpq($2), $3) ! test_cmp3(Gmp.mpq($1), Gmp.mpq($2), Gmp.mpq($3)) ]])
! cond( [[ master()->resolv("Gmp")->mpf ]],[[ ! test_cmp3($1, Gmp.mpf($2), $3) ! test_cmp3(Gmp.mpf($1), Gmp.mpf($2), Gmp.mpf($3)) ]]) ]])
! define([[mpx_test]],[[ ! mpz_test_cmp($1.0,$2,$4($3)) ! mpz_test_cmp($1,$2.0,$4($3.0)) ]])
! define([[mpx_mega_test]],[[ ! mpx_test($1,$2,$3,) ! mpx_test($1,$2,$3,Gmp.mpz) ! mpx_test($1,$2,$3,Gmp.mpq) ! mpx_test($1,$2,$3,Gmp.mpf) ]])
! mpx_mega_test(1,2,3) ! mpx_mega_test(-2,1,4) ! mpx_mega_test(-2,-1,4)
cond( [[ master()->resolv("Gmp")->mpz ]], [[
/ Martin Nilsson (Åskblod)
Previous text:
2003-01-22 23:35: Subject: Gmp testsuite
Well, it's kind of impressive the way all permutations are tested. I have some ideas for optimizations without losing tests, but I'll need some experiment some...
/ Martin Nilsson (Åskblod)
pike-devel@lists.lysator.liu.se