!set n=$teller
!if $graad=0
    R=$teller
!else
    R=$graad
!endif        
wims_texsize=+4
varlist=$empty
arglist=$empty
varcnt=0
woordmax=40
complex=1
plaatje=0
bewerking=common/number.proc
somtekst$n=!record 9 of lang/remarks.$taal

!if $R=1
    k=0
    num=!randint 2,16
    lijst=!record $num of nivo/data4
    lijst=!replace internal @ by , in $lijst
    C=!item 2 of $lijst
    !if $[1*$C]=1
        C= \pi \cdot i
    !else    
        C=!exec pari printtex($C)
        C=$C \cdot \pi \cdot i
    !endif
    opgave$n=e^{$C}\,\,
    GOED$n=!item 1 of $lijst
    goed$n=!texmath $(GOED$n)
!endif

!if $R=2
    k=!randitem 1,2,3,4
    num=!randint 1,16
    lijst=!record $num of nivo/data4
    lijst=!replace internal @ by , in $lijst
    C=!item 2 of $lijst
    !if $[1*$C]=1
        C= \pi \cdot i
    !else    
        C=!exec pari printtex($C)
        C=$C \cdot \pi \cdot i
    !endif
    opgave$n=e^{$C}\,\,
    GOED$n=!item 1 of $lijst
    goed$n=!texmath $(GOED$n)
!endif

!if $R=3
    k=!randitem 0,1,2
    a=!randitem 1/6,1/3,1/4,1/5,1/2,2/3,5/6,3/4,4/5,3/5,1,2,3/2,-1/6,-1/3,-1/4,-1/5,-1/2,-2/3,-5/6,-3/4,-4/5,-3/5,-1
    num=!randint 1,16
    lijst=!record $num of nivo/data4
    lijst=!replace internal @ by , in $lijst
    C=!item 2 of $lijst
    b=!exec pari printtex($C-$a)
    a=!exec pari printtex($a)
    b=$b \cdot \pi \cdot i
    a=$a \cdot \pi \cdot i
    opgave$n=e^{$b}\cdot e^{$a}
    GOED$n=!item 1 of $lijst
    goed$n=!texmath $(GOED$n)
!endif    

!if $R>3
    k=!randitem 0,1
    a=!randitem 1/6,1/3,1/4,1/5,1/2,2/3,5/6,3/4,4/5,3/5,1,2,3/2,-1/6,-1/3,-1/4,-1/5,-1/2,-2/3,-5/6,-3/4,-4/5,-3/5,-1
    num=!randint 1,16
    lijst=!record $num of nivo/data4
    lijst=!replace internal @ by , in $lijst
    C=!item 2 of $lijst
    check=$[$C+$a]
    !ifval $check=0
	a=1/5
    !endif    
    tot=!exec pari printtex($C+$a)\
    printtex($a)
    
    b=!line 1 of $tot
    a=!line 2 of $tot
    
    !if $b=1
	b= \pi \cdot i
    !else
	!if $b=-1
	    b=-\pi \cdot i
	!else
	    b=$b \cdot \pi \cdot i
	!endif
    !endif	
    !if $a=1
	a= \pi \cdot i
    !else
	!if $a=-1
	    a=-\pi \cdot i
	!else
	    a=$a \cdot \pi \cdot i
	!endif
    !endif	
    opgave$n=e^{$b} \div e^{$a}
    #..$a=a..$b=b..$C=C
    GOED$n=!item 1 of $lijst
    goed$n=!texmath $(GOED$n)
 !exit
!endif

