title: how to treat a percentage division by zero?
body: <p>I have data on asset prices, some of the prices are 0. My formula for calculating the return is ((curPrice/prevPrice)-1)*100. What is the best approach to take if the previous price is zero? Is it valid to treat the percentage increase as 100%?</p>
  
  <p>would the following be valid?</p>
  
  <pre><code>previousPrice == 0 ? return 100 : ((curPrice/prevPrice)-1)*100;
  </code></pre>