OKlibrary  0.2.1.6
Quadratics.mac
Go to the documentation of this file.
00001 /* Oliver Kullmann, 5.8.2009 (Swansea) */
00002 /* Copyright 2009 Oliver Kullmann
00003 This file is part of the OKlibrary. OKlibrary is free software; you can redistribute
00004 it and/or modify it under the terms of the GNU General Public License as published by
00005 the Free Software Foundation and included in this library; either version 3 of the
00006 License, or any later version. */
00007 
00022 oklib_include("OKlib/ComputerAlgebra/TestSystem/Lisp/Asserts.mac")$
00023 
00024 kill(f)$
00025 
00026 /* ******************************
00027    * Counting integer equations *
00028    ******************************
00029 */
00030 
00031 okltest_count_quadintsol(f) := block(
00032   assert(f(0,0) = 1),
00033   assert(f(0,-1) = 0),
00034   assert(f(0,1) = 2),
00035   assert(create_list(f(1,n),n,0,9) = [0,0,1,2,4,5,7,8,10,12]),
00036   /* XXX */
00037   if oklib_test_level = 0 then return(true),
00038   assert(create_list(f(1,n),n,10,20) = [14,15,18,19,21,23,26,27,30,31,34]),
00039   true)$
00040 
00041