bewerking=nivo/bewerking1.proc
!set n=$teller
!if $graad =0
    R=$teller
!else
    R=$graad
!endif        

plaatje=0
nivo_title=!record 48 of lang/remarks.$taal
somtekst$n=!record 49 of lang/remarks.$taal
keuze=!randitem 0,1
kans=!randitem 0,1
log=1
breuk=0
varlist=0

!if $R=1
    !if $keuze=0
	!if $kans=0
    	    varlist=0
	    a=!randint 1,30
	    b=!randint 1,30
	    opgave$n=\log \left( $a \right) + \log \left( $b \right)
	    GOED$n=log($[$a*$b])
	    goed$n=\log \left( $a \cdot $b \right) = \log \left( $[$a*$b] \right) 
	!else	
	    breuk=1
	    c=!randint 2,10
    	    b=!randint 2,10
	    a=$[$b*$c]
	    opgave$n=\log \left( $a \right) - \log \left( $b \right)
	    GOED$n=log($c) 
	    goed$n=\log \left( \frac{$a}{$b} \right) = \log \left( $c \right)	
	!endif
      !exit
    !endif
    !if $keuze=1
	varlist=1
	wims_rawmath_variables=x,y
	!if $kans=0
	    opgave$n=\log \left( x \right) + \log \left( y \right)
	    GOED$n=log(x*y) 
	    goed$n=\log \left( x \cdot y \right)
        !else
	    opgave$n=\log \left( x \right) - \log \left( y \right)
	    GOED$n=log(x/y) 
	    goed$n=\log \left( \frac{x}{y} \right)
	!endif
      !exit
    !endif	
!endif

!if $R=2
    !if $keuze=0
	breuk=1
	!if $kans=1
	    a=!randint 1,10
	    b=!randint 1,10
	    c=!randint 15,30
	    tot=!exec pari $b*($a/$c)\
	    printtex($a/$c)
	    ab=!line 1 of $tot
	    a=!line 2 of $tot 
	    opgave$n=\log \left( $a \right) + \log \left( $b \right)
	    GOED$n=log($ab)
	    AB=!texmath $ab
	    goed$n=\log \left( $a \cdot $b \right) = \log \left( $AB \right) 
	!else
	    c=!randitem 1/2,1/3,1/4,1/5,1/6,2/3,3/4,2/5,3/5,3/8,5/8,3/2,4/5,7/8
	    b=!randint 1,30 
	    a=!exec pari A= $b*($c)
	    opgave$n=\log \left( $a \right) - \log \left( $b \right)
	    GOED$n=log($c) 
	    C=!texmath $c
	    goed$n=\log \left( \frac{$a}{$b} \right) = \log \left( $C \right )	 	
	!endif
     !exit
    !endif
    !if $keuze=1
	varlist=1
	wims_rawmath_variables=x,y
	!if $kans=1
	    c=!randint 2,10
	    b=!randint 2,10
	    a=$[$b*$c]
	    opgave$n=\log \left( $a \cdot x \right) - \log \left( $b \cdot y \right)
	    GOED$n=log($c*x/y)
	    goed$n=\log \left( \frac{$a \cdot x}{$b \cdot y} \right) = \log \left( $c \cdot \frac{x}{y} \right)
	!else
	    a=!randint 2,10
	    b=!randint 2,10
	    opgave$n=\log \left( $a \cdot x\right) + \log \left( $b \cdot y \right)
	    GOED$n=log($[$a*$b]*x*y)
	    goed$n=\log \left( $a \cdot x \cdot $b \cdot y \right) = \log \left( $[$a*$b] \cdot x \cdot y \right)
	!endif     
      !exit
    !endif	
!endif
	
!if $R=3
    !if $keuze=1
	!if $kans=0
    	    c=!randitem 2,3,4
	    a=!randitem 1,2,3,4,5,6,7
	    b=!randitem 1,2,3,4,5,6,7
	    opgave$n=$c \cdot \log \left( $a \right) + \log \left( $b \right)
	    GOED$n=log($b*$a^$c) 	
	    goed$n=\log \left( $a^{$c} \right) + \log \left( $b \right) = \log \left( $b \cdot $a^{$c} \right)
	!else
	    wims_texsize=+2
	    varlist=1
    	    wims_rawmath_variables=x,y,z
	    opgave$n=z \cdot \log \left( x \right) + \log \left( y \right)
	    GOED$n=log(y*x^z)
	    goed$n=\log \left( x^{z} \right) + \log \left( y \right) = \log \left( x^{z} \cdot y \right)
	!endif	
      !exit
    !else
	c=!randitem 1,2,3,4
	a=!randitem 2,3,4,5,6,7,8,9,10,11,12,13
	!if $kans=0
	    opgave$n=$c + \log \left( $a \right)
	    GOED$n=log($a*10^$c)
	    goed$n=\log \left( 10^{$c} \right) + \log \left( $a \right) = \log \left( $a \cdot 10^{$c} \right)
	!else
	    opgave$n=$c - \log \left( $a \right)
	    B=!exec pari 10^$c/$a
	    GOED$n=log($B)
	    goed$n=\log \left( 10^{$c} \right) - \log \left( $a \right) = \log \left( \frac{10^{$c}}{$a} \right) = \log \left( $B \right)
	!endif
     !exit 
    !endif
!endif
	
!if $R>3
    wims_texsize=+2
    !if $keuze=0
	c=!randitem 2,3,4,5,6,7
	a=!randitem 2,3,4,5,6,7
	b=!randitem 2,3,4,5,6,7
	opgave$n=\frac{1}{$c} \cdot \log \left( $a^{$c} \right) + \log \left( $b \right)
	GOED$n=log($b*$a)
	goed$n=\log \left( \left( $a^{$c} \right) ^{\frac{1}{$c}} \right) +  \log \left( $b \right) = \log \left($a \cdot $b \right) = \log \left( $[$a*$b] \right)
     !exit
    !endif
    !if $keuze=1
	varlist=1
	wims_rawmath_variables=x,y,z
	opgave$n=\frac{1}{z} \cdot \log \left(x ^{z}\right) + \log \left(y\right)
	GOED$n=log(x*y)
	goed$n=\log \left( \left( x^{z} \right) ^{\frac{1}{z}} \right) +  \log \left( y \right) = \log \left(x \cdot y \right) 
      !exit
    !endif	
!endif
	
