!goto $wims_read_parm

:def
title=Déterminant
synonyme=det
input=square_matrix
!exit

:proc
result=!exec pari matdet([$mat])
!exit

:output
!set pars=$[max(min($rows,10),1)]

<table class="wimscenter wimsnoborder">
!for i=1 to $rows
 !set l=!line $i of $formula
 <tr>
 !if $i=1
  <td rowspan="$rows">det $(m_leftpar$pars)</td>
 !endif
 !for j=1 to $cols
  !set k=!item $j of $l
  <td>$k</td>
 !next j
 !if $i=1
  <td rowspan="$rows">$(m_rightpar$pars) = $result</td>
 !endif
 </tr>
!next i

</table>
!exit

