source: git/factory/ftest/sqrfree.m4 @ f53020

fieker-DuValspielwiese
Last change on this file since f53020 was f53020, checked in by Jens Schmidt <schmidt@…>, 25 years ago
Initial revision git-svn-id: file:///usr/local/Singular/svn/trunk@2845 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 1.3 KB
Line 
1/* emacs edit mode for this file is -*- C++ -*- */
2/* $Id: sqrfree.m4,v 1.1 1999-02-16 16:47:38 schmidt Exp $ */
3
4ftestSetNameOfGame( sqrfree, `"
5Usage: sqrfree [<options>] [<envSpec>] [sort=<flag>] <f>
6  computes squarefree decomposition of canonical form <f>.
7  If optional <flag> is set, squarefree factors are returned
8  sorted by multiplicity.
9"'`' )
10
11//{{{ docu
12//
13// ftestAlgorithm.m4 - ftestAlgorithm test program.
14//
15// To create ftestAlgorithm.cc, run m4 using the ftest_util.m4 library in
16// the following way:
17//
18// m4 ftest_util.m4 ftestAlgorithm.m4 > ftestAlgorithm.cc
19//
20//}}}
21
22ftestPreprocInit();
23
24ftestGlobalInit();
25
26//
27// - main program.
28//
29int
30main ( int argc, char ** argv )
31{
32    // initialization
33    ftestMainInit();
34
35    // declare input and output variables
36    ftestOutVar( CFFList, result );
37    ftestInVar( bool, flag );
38    ftestInVar( CanonicalForm, f );
39
40    // process argument list and set environment
41    ftestGetOpts();
42    ftestGetEnv();
43    ftestGetInVar( flag, false, "sort" );
44    ftestGetInVar( f );
45
46    // do the test!
47    ftestRun( result = sqrFree( f, flag ); );
48
49    // print results
50    if ( ftestArgGiven( flag ) && flag ) {
51        ftestOutput( "sqrfree(f)", result );
52    } else {
53        ftestOutput( "sqrfree(f) (unsorted)", result );
54    }
55
56    // clean up
57    ftestMainExit();
58}
Note: See TracBrowser for help on using the repository browser.