[system] / trunk / pg / macros / answerComposition.pl Repository:
ViewVC logotype

Diff of /trunk/pg/macros/answerComposition.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 5551 Revision 5554
16 16
17=head1 MACROS 17=head1 MACROS
18 18
19=head2 COMPOSITION_ANS 19=head2 COMPOSITION_ANS
20 20
21 COMPOSITION_ANS($f, $g, %options) 21 COMPOSITION_ANS($f, $g, %options)
22 22
23An answer checked to see if $f composed with $g matches a given function,where 23An answer checked to see if $f composed with $g matches a given function,where
24$f and $g are one possible decomposition of the target function, and options are 24$f and $g are one possible decomposition of the target function, and options are
25any of the options allowed by composition_ans_list() below. 25any of the options allowed by composition_ans_list() below.
26 26
32supplied. (It may be best to use the NAMED_COMPOSITION_ANS checker below, which 32supplied. (It may be best to use the NAMED_COMPOSITION_ANS checker below, which
33specifies the answer blanks explicitly.) 33specifies the answer blanks explicitly.)
34 34
35Example: 35Example:
36 36
37 BEGIN_TEXT 37 BEGIN_TEXT
38 \(f\circ g = (1+x)^2\) when 38 \(f\circ g = (1+x)^2\) when
39 \(f(x)\) = \{ans_rule(20)\} and \(g(x)\) = \{ans_rule(20)\} 39 \(f(x)\) = \{ans_rule(20)\} and \(g(x)\) = \{ans_rule(20)\}
40 END_TEXT 40 END_TEXT
41 COMPOSITION_ANS("x^2","1+x"); 41 COMPOSITION_ANS("x^2","1+x");
42 42
43=cut 43=cut
44 44
45sub COMPOSITION_ANS { 45sub COMPOSITION_ANS {
46 my $f = shift; my $g = shift; 46 my $f = shift; my $g = shift;

Legend:
Removed from v.5551  
changed lines
  Added in v.5554

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9