Rev 20 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 20 | Rev 16120 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 |
|
1 | ker=!item 2 of $methparmobj1 |
2 |
|
2 | ker=!mathsubst integrate= in $ker |
3 |
|
3 | ker=!trim $ker |
4 |
|
4 | ker=!declosing $ker |
5 |
|
5 | !distribute items $ker into iker,ivar |
6 |
|
6 | vartest=!varlist $ivar |
7 |
|
7 | !if $ivar != $vartest |
8 | error=Fail |
8 | error=Fail |
9 | !exit |
9 | !exit |
10 |
|
10 | !endif |
11 | 11 | ||
12 |
|
12 | !bound methparm2 between integer 0 and $basiccnt default 0 |
13 |
|
13 | !if $methparm2=0 |
14 |
|
14 | error=empty_data |
15 |
|
15 | !exit |
16 |
|
16 | !endif |
17 | 17 | ||
18 |
|
18 | form=!item $methparm2 of $basic |
19 |
|
19 | ftest=$form |
20 |
|
20 | form=!mathsubst a=1 in $form |
21 |
|
21 | form=!mathsubst t=$ivar in $form |
22 |
|
22 | !if $ftest=a*t^b |
23 | test=!mathsubst $ivar=1 in $iker |
23 | test=!mathsubst $ivar=1 in $iker |
24 | coef=$[$test] |
24 | coef=$[$test] |
25 | !if NaN isin $coef |
25 | !if NaN isin $coef |
26 | !goto badformula |
26 | !goto badformula |
27 | !endif |
27 | !endif |
28 | !if $coef=0 |
28 | !if $coef=0 |
29 | !if $[$iker]!=0 |
29 | !if $[$iker]!=0 |
30 | !goto badformula |
30 | !goto badformula |
31 | !else |
31 | !else |
32 | !goto OK |
32 | !goto OK |
33 | !endif |
33 | !endif |
34 | !endif |
34 | !endif |
35 | !read deduc/sub/simplify log(($iker)/($test))/log($ivar) |
35 | !read deduc/sub/simplify log(($iker)/($test))/log($ivar) |
36 | power=$[$out] |
36 | power=$[$out] |
37 | !if $out=$empty or NaN isin $power or Inf isin $power |
37 | !if $out=$empty or NaN isin $power or Inf isin $power |
38 | !goto badformula |
38 | !goto badformula |
39 | !endif |
39 | !endif |
40 | !goto OK |
40 | !goto OK |
41 |
|
41 | !endif |
42 |
|
42 | !read deduc/sub/simplify ($iker)/($form) |
43 |
|
43 | test=$[$out] |
44 |
|
44 | !if NaN isin $test |
45 | :badformula |
45 | :badformula |
46 | error=Bad formula! |
46 | error=Bad formula! |
47 | !advance penalty |
47 | !advance penalty |
48 | !exit |
48 | !exit |
49 |
|
49 | !endif |
50 |
|
50 | !if Inf isin $test or $test=0 |
- | 51 | =0 |
|
51 | error=bad_data |
52 | error=bad_data |
52 | !exit |
53 | !exit |
53 |
|
54 | !endif |
54 | 55 | ||
55 |
|
56 | :OK |
56 |
|
57 | got=!exec maxima integrate($iker,$ivar) |
57 |
|
58 | !if $got=$empty or integrate isvarof $got |
58 | error=Fail |
59 | error=Fail |
59 | !exit |
60 | !exit |
60 |
|
61 | !endif |
61 | - | ||
62 | newobject1=($got) |
- | |
63 | oldobject=1 |
- | |
64 | methexp=basic formula |
- | |
65 | 62 | ||
- | 63 | newobject1=($got) |
|
- | 64 | oldobject=1 |
|
- | 65 | methexp=basic formula |