
good=!rawmath $(replygood$i)
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
mres=!exec maxima print($good);\
	print($dd);\
	print(ratsimp($good-($dd)));
!if $primetrans=yes
 mres=!replace internal djkz by ' in $mres
!endif
!distribute lines $mres into t1,t2,t3

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 $dd=$good
  diareply$i=good
  !advance freegot
 !else
  test=NaN badform
  !exit
 !endif
!else
 diareply$i=bad
!endif

