Skip to content

Commit a8480d0

Browse files
committed
rebuilding site Fri Apr 21 22:06:37 EDT 2017
1 parent 9a6d4a7 commit a8480d0

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

index.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@
364364

365365
<h3 id="numerical-stability">Numerical Stability</h3>
366366

367-
<p>Consider the equation $y = log(1 + x)$. This equation is not <a href="https://en.wikipedia.org/wiki/Numerical_stability" target="_blank">numerically stable</a> - for very small values of <code>x</code>, the answer will most likely be wrong. This is because of the way <code>float64</code> is designed - a <code>float64</code> does not have enough bits to be able to tell apart <code>1</code> and <code>1 + 10e-16</code>. In fact, the correct way to do $latex y = log(1 + x)$ is to use the built in library function <code>math.Log1p</code>. It can be shown in this simple program:</p>
367+
<p>Consider the equation $y = log(1 + x)$. This equation is not <a href="https://en.wikipedia.org/wiki/Numerical_stability" target="_blank">numerically stable</a> - for very small values of <code>x</code>, the answer will most likely be wrong. This is because of the way <code>float64</code> is designed - a <code>float64</code> does not have enough bits to be able to tell apart <code>1</code> and <code>1 + 10e-16</code>. In fact, the correct way to do $ y = log(1 + x)$ is to use the built in library function <code>math.Log1p</code>. It can be shown in this simple program:</p>
368368

369369
<pre><code class="language-go">func main() {
370370
fmt.Printf("%v\n", math.Log(1.0+10e-16))

post/deeplearning_in_go_part_1/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,7 @@ <h2 id="why-graph-objects">Why Graph Objects?</h2>
524524

525525
<h3 id="numerical-stability">Numerical Stability</h3>
526526

527-
<p>Consider the equation $y = log(1 + x)$. This equation is not <a href="https://en.wikipedia.org/wiki/Numerical_stability" target="_blank">numerically stable</a> - for very small values of <code>x</code>, the answer will most likely be wrong. This is because of the way <code>float64</code> is designed - a <code>float64</code> does not have enough bits to be able to tell apart <code>1</code> and <code>1 + 10e-16</code>. In fact, the correct way to do $latex y = log(1 + x)$ is to use the built in library function <code>math.Log1p</code>. It can be shown in this simple program:</p>
527+
<p>Consider the equation $y = log(1 + x)$. This equation is not <a href="https://en.wikipedia.org/wiki/Numerical_stability" target="_blank">numerically stable</a> - for very small values of <code>x</code>, the answer will most likely be wrong. This is because of the way <code>float64</code> is designed - a <code>float64</code> does not have enough bits to be able to tell apart <code>1</code> and <code>1 + 10e-16</code>. In fact, the correct way to do $ y = log(1 + x)$ is to use the built in library function <code>math.Log1p</code>. It can be shown in this simple program:</p>
528528

529529
<pre><code class="language-go">func main() {
530530
fmt.Printf(&quot;%v\n&quot;, math.Log(1.0+10e-16))

post/index.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@
354354

355355
&lt;h3 id=&#34;numerical-stability&#34;&gt;Numerical Stability&lt;/h3&gt;
356356

357-
&lt;p&gt;Consider the equation $y = log(1 + x)$. This equation is not &lt;a href=&#34;https://en.wikipedia.org/wiki/Numerical_stability&#34; target=&#34;_blank&#34;&gt;numerically stable&lt;/a&gt; - for very small values of &lt;code&gt;x&lt;/code&gt;, the answer will most likely be wrong. This is because of the way &lt;code&gt;float64&lt;/code&gt; is designed - a &lt;code&gt;float64&lt;/code&gt; does not have enough bits to be able to tell apart &lt;code&gt;1&lt;/code&gt; and &lt;code&gt;1 + 10e-16&lt;/code&gt;. In fact, the correct way to do $latex y = log(1 + x)$ is to use the built in library function &lt;code&gt;math.Log1p&lt;/code&gt;. It can be shown in this simple program:&lt;/p&gt;
357+
&lt;p&gt;Consider the equation $y = log(1 + x)$. This equation is not &lt;a href=&#34;https://en.wikipedia.org/wiki/Numerical_stability&#34; target=&#34;_blank&#34;&gt;numerically stable&lt;/a&gt; - for very small values of &lt;code&gt;x&lt;/code&gt;, the answer will most likely be wrong. This is because of the way &lt;code&gt;float64&lt;/code&gt; is designed - a &lt;code&gt;float64&lt;/code&gt; does not have enough bits to be able to tell apart &lt;code&gt;1&lt;/code&gt; and &lt;code&gt;1 + 10e-16&lt;/code&gt;. In fact, the correct way to do $ y = log(1 + x)$ is to use the built in library function &lt;code&gt;math.Log1p&lt;/code&gt;. It can be shown in this simple program:&lt;/p&gt;
358358

359359
&lt;pre&gt;&lt;code class=&#34;language-go&#34;&gt;func main() {
360360
fmt.Printf(&amp;quot;%v\n&amp;quot;, math.Log(1.0+10e-16))

0 commit comments

Comments
 (0)