PHP Pow Function a reverse required
<p>I have something with pow I need to return a whole inter for different results (reversed basically)</p>

<p>For Example (rounded to 4 decimals): </p>

<pre><code>&lt;?php
$var = 10 * pow(1.01,0); // = 10
$var = 10 * pow(1.01,1); // = 10.1
$var = 10 * pow(1.01,2); // = 10.201
$var = 10 * pow(1.01,3); // = 10.303
</code></pre>

<p>etc</p>

<p>How could I return the whole number for <code>10.1150 = 1</code> since it is above <code>10 * pow(1.01,1);</code> and below <code>10 * pow(1.01,2);</code></p>

<p>The <code>1.01</code> can also be a number of variables, (percentage scaled point and figure charting), why I need the Whole number only of the percentage differences (1 box = 1 percentage change from the box above or below)</p>

<p>Thanks much all, I've battled with this issue in many different ways including x all price data points for 250 percentage changed into an array, that is fast, except to build the array becomes the slow issue.  <code>if else</code> is the current solution but for <strong>2500 price points on 250 charts = 2 seconds</strong> just to find a plot point, considering I'm doing 10's of millions of charts daily, 2 seconds = a lot of time accumulated.</p>
