spielwiese
Last change
on this file since 547a8c was
547a8c,
checked in by Jens Schmidt <schmidt@…>, 26 years ago
|
* deriv.m4: cosmetic changes
* size.m4, degree.m4, deriv.m4, totaldegree, resultant: doc fix
git-svn-id: file:///usr/local/Singular/svn/trunk@881 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: deriv.m4,v 1.4 1997-11-05 16:13:07 schmidt Exp $ */ |
---|
3 | |
---|
4 | ftestSetNameOfGame( deriv, `" |
---|
5 | Usage: deriv [<options>] [<envSpec>] <f> [<x>] |
---|
6 | calculates df/dx or derivation of canonical form f with respect |
---|
7 | to main variable if variable x is not specified. |
---|
8 | "'`' ) |
---|
9 | |
---|
10 | //{{{ docu |
---|
11 | // |
---|
12 | // ftestAlgorithm.m4 - ftestAlgorithm test program. |
---|
13 | // |
---|
14 | // To create ftestAlgorithm.cc, run m4 using the ftest_util.m4 library in |
---|
15 | // the following way: |
---|
16 | // |
---|
17 | // m4 ftest_util.m4 ftestAlgorithm.m4 > ftestAlgorithm.cc |
---|
18 | // |
---|
19 | //}}} |
---|
20 | |
---|
21 | ftestPreprocInit(); |
---|
22 | |
---|
23 | ftestGlobalInit(); |
---|
24 | |
---|
25 | // |
---|
26 | // - main program. |
---|
27 | // |
---|
28 | int |
---|
29 | main ( int argc, char ** argv ) |
---|
30 | { |
---|
31 | // initialization |
---|
32 | ftestMainInit(); |
---|
33 | |
---|
34 | // declare input and output variables |
---|
35 | ftestOutVar( CanonicalForm, result ); |
---|
36 | ftestInVar( CanonicalForm, f ); |
---|
37 | ftestInVar( Variable, x ); |
---|
38 | |
---|
39 | // process argument list and set environment |
---|
40 | ftestGetOpts(); |
---|
41 | ftestGetEnv(); |
---|
42 | ftestGetInVar( f ); |
---|
43 | ftestGetInVar( x, Variable() ); |
---|
44 | |
---|
45 | // do the test! |
---|
46 | ftestRun( |
---|
47 | if ( ftestArgGiven( x ) ) |
---|
48 | result = f.deriv( x ); |
---|
49 | else |
---|
50 | result = f.deriv(); ); |
---|
51 | |
---|
52 | // print results |
---|
53 | if ( ftestArgGiven( x ) ) { |
---|
54 | ftestOutput( "df/dx", result ); |
---|
55 | } else { |
---|
56 | ftestOutput( "df", result ); |
---|
57 | } |
---|
58 | |
---|
59 | // clean up |
---|
60 | ftestMainExit(); |
---|
61 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.