File: litexp

package info (click to toggle)
wims 2%3A4.29a%2Bdfsg1-3
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 185,704 kB
  • sloc: xml: 366,687; javascript: 120,570; ansic: 62,341; java: 62,170; sh: 7,744; perl: 3,937; yacc: 3,217; cpp: 1,915; lex: 1,805; makefile: 1,084; lisp: 914; pascal: 601; python: 520; php: 318; asm: 7
file content (91 lines) | stat: -rw-r--r-- 1,923 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
option:symbols=" "
good=!rawmath $(replygood$i)
replyGood$i=!item 1 of $good
good=!row 1 of $good
good=!nospace $good
vars=!varlist nofn $good
wims_rawmath_variables=$vars
dd=!rawmath $(reply$i)
dd=!mathsubst I=i in $dd
dd=!nospace $dd

primetrans=
!if ' isin $good$dd
  good=!replace internal ' by djkz in $good
  dd=!replace internal ' by djkz in $dd
  primetrans=yes
!endif
goodcnt=!itemcnt $good
!if $goodcnt>1
  test=
  !for t=1 to $goodcnt
    test=$test($(good[$t])-($dd))
  !next t
  test=!rawmath $test
  good1=[$good]
!else
  test=$good-($dd)
  good1=$good
!endif
mres=!exec maxima print($good1);\
	print($dd);\
	print(ratsimp($test));
!if $primetrans=yes
  mres=!replace internal djkz by ' in $mres
!endif
!distribute lines $mres into t1,t2,t3
t1=!declosing $t1

!! -------- added for automake good reponse in case of use of polexpand and polfactor for litexp 
!if polexpand iswordof $(replyoption$i)
  !let replyGood$i=!exec maxima print(expand($good));
!endif
!if polfactor iswordof $(replyoption$i)
  !let replyGood$i=!exec maxima print(factor($good));
!endif
!! --- end of add

m_reply$i=$t2
!if $wims_read_parm=nocompare
  !if $t2=$empty or $t3=$empty
    test=NaN
  !endif
  !exit
!endif

!if $t1=$empty
  Test=bad $i
  !exit
!endif
!if $t2=$empty or $t3=$empty
  test=NaN
  !exit
!endif

!if $t3=0 or $t3=0.0
  !if polexpand notwordof $(replyoption$i) and polfactor notwordof $(replyoption$i)
    !if $dd isitemof $good
      diareply$i=good
      !advance freegot
    !else
      test=NaN badform
    !endif
  !else
    !if polexpand iswordof $(replyoption$i)
      !readproc oef/analyse/expandpolynome $dd
    !else
      !readproc oef/analyse/factorpolynome $dd
    !endif
    !if $wrong!=$empty
!!  !if noerrordetail iswordof $(replyoption$i)
!!    wrong=badform
!!  !endif
      test=NaN $wrong
    !else
      diareply$i=good
      !advance freegot
    !endif
  !endif
!else
  diareply$i=bad
!endif