<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Math on Lin's Blog</title><link>https://coder.tw/en/tags/math/</link><description>Recent content in Math on Lin's Blog</description><generator>Hugo</generator><language>en-US</language><lastBuildDate>Sun, 24 Jul 2011 08:25:37 +0000</lastBuildDate><atom:link href="https://coder.tw/en/tags/math/index.xml" rel="self" type="application/rss+xml"/><item><title>Solving Pascal's Triangle with a Formula! (Thanks to Cang Hai)</title><link>https://coder.tw/en/posts/pascal-triangle-formula-solution/</link><pubDate>Sun, 24 Jul 2011 08:25:37 +0000</pubDate><guid>https://coder.tw/en/posts/pascal-triangle-formula-solution/</guid><description>&lt;p&gt;&lt;a href="https://pub-6c026d2742d14927bfa2d850c31eac91.r2.dev/wp-content/uploads/2011/07/210px-PascalTriangleAnimated2.gif"&gt;&lt;img title="210px-PascalTriangleAnimated2" src="https://pub-6c026d2742d14927bfa2d850c31eac91.r2.dev/wp-content/uploads/2011/07/210px-PascalTriangleAnimated2.gif" alt="" width="210" height="194" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The image above is from Wikipedia and is used to explain Pascal&amp;rsquo;s triangle.&lt;/p&gt;
&lt;p&gt;Today&amp;rsquo;s topic is the so-called Pascal&amp;rsquo;s triangle. Some people also call it Yang Hui&amp;rsquo;s triangle or Jia Xian&amp;rsquo;s triangle. The first row&amp;rsquo;s first entry is &amp;ldquo;1&amp;rdquo;. Each number below equals the sum of the number to its upper left and the number to its upper right. If there is no number to the upper left or upper right, it counts as 0. For example, the second row has two numbers, &amp;ldquo;1, 1&amp;rdquo;. The third row is &amp;ldquo;1, 2, 1&amp;rdquo;. And this triangle can extend infinitely.&lt;/p&gt;</description></item><item><title>How to Convert a Decimal Number to Binary?</title><link>https://coder.tw/en/posts/decimal-to-binary-conversion/</link><pubDate>Sat, 16 Apr 2011 19:38:38 +0000</pubDate><guid>https://coder.tw/en/posts/decimal-to-binary-conversion/</guid><description>&lt;p&gt;&lt;a href="https://pub-6c026d2742d14927bfa2d850c31eac91.r2.dev/wp-content/uploads/2011/04/2011-04-16_185412.jpg"&gt;&lt;img title="2011-04-16_185412" src="https://pub-6c026d2742d14927bfa2d850c31eac91.r2.dev/wp-content/uploads/2011/04/2011-04-16_185412.jpg" alt="" width="205" height="237" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;del&gt;I expect someone will say this article is too simple again once I finish writing it...&lt;/del&gt; Without further ado: this week, our teacher gave our class a problem, which is how to convert a decimal number to binary. If you do it with math, it isn't hard. Just use short division and take the remainders.&lt;/p&gt;
&lt;p&gt;</description></item><item><title>[C++] How to Do Exponentiation and Square Roots (sqrt, pow)</title><link>https://coder.tw/en/posts/c-power-and-square-root-sqrt-pow/</link><pubDate>Fri, 18 Mar 2011 15:05:05 +0000</pubDate><guid>https://coder.tw/en/posts/c-power-and-square-root-sqrt-pow/</guid><description>&lt;p&gt;&lt;a href="https://pub-6c026d2742d14927bfa2d850c31eac91.r2.dev/wp-content/uploads/2011/03/2011-03-18_151805.jpg"&gt;&lt;img class="alignnone size-large wp-image-367" title="2011-03-18_151805" src="https://pub-6c026d2742d14927bfa2d850c31eac91.r2.dev/wp-content/uploads/2011/03/2011-03-18_151805-540x380.jpg" alt="" width="540" height="380" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;In some programming languages, you can do exponentiation directly with the ^ operator. But while working on a problem, I found out that in C++, you have to use the pow function to do exponentiation. This article introduces two functions: pow, which does exponentiation for you, and sqrt, which takes square roots.&lt;/p&gt;</description></item></channel></rss>