title: Generate N numbers whose product is 1 and more generally when the product is P?
body: <p>I would like to generate N random points whose product is some value 1.</p>
  
  <p>I did it in MATALB this way:</p>
  
  <pre><code>N_=10;
  x1_=rand(1, N_);
  p_=prod(x1_);
  x_=x1_;
  x_(end)=x1_(end)/p_;
  prod(x_);
  </code></pre>
  
  <p>Is there a simple (other way)? And What about when P ~= 1?</p>
  
  <p>Thanks.</p>