Subversion Repositories wimsdev

Rev

Rev 17511 | Blame | Compare with Previous | Last modification | View Log | RSS feed

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
!if % isin $dd
  test=NaN badform
  !exit
!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