<html>
    <head>
      <base href="http://bugzilla.scilab.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
         <tr>
                <th>Reporter</th>
            <td>adelson.oliveira@gmail.com</td>
         </tr>
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - householder function fails with division by zero"
   href="http://bugzilla.scilab.org/show_bug.cgi?id=13810">13810</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>householder function fails with division by zero
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>Scilab software
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>5.5.2 final version
          </td>
        </tr>


        <tr>
          <th>OS</th>
          <td>All OS
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>Blocker
          </td>
        </tr>


        <tr>
          <th>Component</th>
          <td>Numerical Math
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>bugzilla.admin@scilab.org
          </td>
        </tr>
</table>
      <p>
        <div>
        <pre>Description:
Scilab function householder fails to operate on vectors with just the first line positive and different of zero like [1;0;0]


Log: scilab returns division by zero for,

householder([1;0;0])


Reproduce the error simply defining vector x=[x1;x2;x3;.....;xn] with all xi=0 except x1>0 and try householder(x);


OTHER INFORMATION:
------------------
A possible solution.
Householder of a general vector x admits two possible solutions based on (x-|x|e1) and (x+|x|e1) where e1 is [1;0;0;.....;0]. If x = Const*e1, one of
these two choices is zero, depending on x1 being positive or negative, thus rendering normalization impossible. A safe choice for this would be,

x + SIGN(x1) x1 e1.

Scilab implements only x-|x|e1 thus if x1 is positive and x=Const*e1 this vector is zero.

Thanks.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are watching all bug changes.</li>
      </ul>
    </body>
</html>