<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Labix Blog &#187; Math</title>
	<atom:link href="http://blog.labix.org/tag/math/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.labix.org</link>
	<description>by Gustavo Niemeyer</description>
	<lastBuildDate>Mon, 16 Jan 2012 04:02:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Wiki + Spreadsheet</title>
		<link>http://blog.labix.org/2008/08/12/wiki-spreadsheet</link>
		<comments>http://blog.labix.org/2008/08/12/wiki-spreadsheet#comments</comments>
		<pubDate>Tue, 12 Aug 2008 07:46:17 +0000</pubDate>
		<dc:creator>Gustavo Niemeyer</dc:creator>
				<category><![CDATA[Math]]></category>
		<category><![CDATA[Project]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://blog.labix.org/?p=96</guid>
		<description><![CDATA[The underlying concept is very simple: spreadsheets are a way to organize text, numbers and formulas into what might be seen as a natively numeric environment: a matrix. So what would happen if we loosed some of the bolts of &#8230; <a href="http://blog.labix.org/2008/08/12/wiki-spreadsheet">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>The underlying concept is very simple: spreadsheets are a way to organize text, numbers and formulas into what might be seen as a natively numeric environment: a matrix.  So what would happen if we loosed some of the bolts of the numeric-oriented organization, and tried to reuse the same concepts into a more formatting-oriented environment which is naturally collaborative: a wiki.</p>
<p>While I do encourage you to answer this with some fantastic new online service (please provide me with an account and the best e-book reader device available once you&#8217;re rich) I had a try at answering this question myself a while ago by writing <a href="http://labix.org/calc">the Calc macro for Moin</a>.</p>
<p>Basically, the Calc macro allows extracting values found in a wiki page into lists (think columns or rows), and applying formulas and further formatting as wanted.</p>
<p>I believe there&#8217;s a lot of potential on the basic concept, and the prototype, even though functional and useful, surely has a lot to evolve, so I&#8217;ve <a href="https://launchpad.net/moin-calc">published the project in Launchpad</a> to make contributions easier. I actually apologize for not publishing it earlier.  There was hope that more features would be implemented before releasing, but now it&#8217;s clear that it won&#8217;t get many improvements from me anytime soon. If you do decide to improve it, please try to prepare patches which are mostly ready for integration, including full testing, since I can&#8217;t dedicate much time for it myself in the foreseeable future.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.labix.org/2008/08/12/wiki-spreadsheet/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Hey, nice float!</title>
		<link>http://blog.labix.org/2005/10/14/hey-nice-float</link>
		<comments>http://blog.labix.org/2005/10/14/hey-nice-float#comments</comments>
		<pubDate>Fri, 14 Oct 2005 09:22:00 +0000</pubDate>
		<dc:creator>Gustavo Niemeyer</dc:creator>
				<category><![CDATA[Math]]></category>
		<category><![CDATA[Project]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://blog.labix.org/2005/10/14/hey-nice-float/</guid>
		<description><![CDATA[python-nicefloat is a Python module implementing an algorithm based on the paper &#8220;Printing Floating-Point Numbers Quickly and Accurately&#8221;, by Robert G. Burger and R. Kent Dybvig. The implemented algorithm will find the shortest, correctly rounded output string representing a decimal &#8230; <a href="http://blog.labix.org/2005/10/14/hey-nice-float">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://labix.org/python-nicefloat">python-nicefloat</a> is a Python module implementing an algorithm based on the paper <i>&#8220;Printing Floating-Point Numbers Quickly and Accurately&#8221;</i>, by <i>Robert G. Burger</i> and <i>R. Kent Dybvig</i>.</p>
<p>The implemented algorithm will find the shortest, correctly rounded output string representing a decimal number that converts to the same internal binary floating-point number when read.</p>
<p><b>Update:</b> the download link is now fixed.</p>
<p>Have fun!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.labix.org/2005/10/14/hey-nice-float/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Problem of the Week at University of Massachusetts</title>
		<link>http://blog.labix.org/2005/04/10/problem-of-the-week-at-university-of-massachusetts</link>
		<comments>http://blog.labix.org/2005/04/10/problem-of-the-week-at-university-of-massachusetts#comments</comments>
		<pubDate>Sun, 10 Apr 2005 22:54:00 +0000</pubDate>
		<dc:creator>Gustavo Niemeyer</dc:creator>
				<category><![CDATA[Math]]></category>
		<category><![CDATA[Puzzle]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://blog.labix.org/2005/04/10/problem-of-the-week-at-university-of-massachusetts/</guid>
		<description><![CDATA[University of Massachusetts has a very nice Problem of the Week service where they post a new math related problem every monday. At that time they report the percentage of people that correctly answered the question as well. To submit &#8230; <a href="http://blog.labix.org/2005/04/10/problem-of-the-week-at-university-of-massachusetts">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>University of Massachusetts has a very nice <a href="http://www.umassd.edu/mathcontest/pow.cfm">Problem of the Week</a> service where they post a new math related problem every monday. At that time they report the percentage of people that correctly answered the question as well. To submit an answer, check the <a href="http://www.umassd.edu/mathcontest/rules.cfm">rules</a> page. They&#8217;re usually very quick at answering if a given solution is correct or not.</p>
<p>This week&#8217;s problem is not specially challenging though. The problem name is <i>Turn the page</i>, and consists of the following question:</p>
<p><i>A novel has 527 pages (pages 1 â€“ 527).  How many digits will it take to number all 527 pages from 1 to 527?</i></p>
<p>How many people wouldn&#8217;t know how to solve that? Solving with eyes closed is kind of fun, but with help from a calculator or from any programming language it&#8217;s trivial. In python, that single line does the job:</p>
<pre>
sum([len(str(i)) for i in range(1,527+1)])
</pre>
<p>Let&#8217;s hope for a more interesting problem next week. There are some good problems from previous weeks <a href="http://www.umassd.edu/mathcontest/powold.cfm">available</a> as well.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.labix.org/2005/04/10/problem-of-the-week-at-university-of-massachusetts/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>All combinations of N elements</title>
		<link>http://blog.labix.org/2005/04/08/all-combinations-of-n-elements</link>
		<comments>http://blog.labix.org/2005/04/08/all-combinations-of-n-elements#comments</comments>
		<pubDate>Fri, 08 Apr 2005 23:53:00 +0000</pubDate>
		<dc:creator>Gustavo Niemeyer</dc:creator>
				<category><![CDATA[Math]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Snippet]]></category>

		<guid isPermaLink="false">http://blog.labix.org/2005/04/08/all-combinations-of-n-elements/</guid>
		<description><![CDATA[Here&#8217;s a snippet to compute all combinations of N elements over K positions.]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a <a href="http://labix.org/snippets/permutations">snippet</a> to compute all combinations of N elements over K positions.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.labix.org/2005/04/08/all-combinations-of-n-elements/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Permutations of all subsets</title>
		<link>http://blog.labix.org/2005/04/08/permutations-of-all-subsets</link>
		<comments>http://blog.labix.org/2005/04/08/permutations-of-all-subsets#comments</comments>
		<pubDate>Fri, 08 Apr 2005 07:11:00 +0000</pubDate>
		<dc:creator>Gustavo Niemeyer</dc:creator>
				<category><![CDATA[Math]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Snippet]]></category>

		<guid isPermaLink="false">http://blog.labix.org/2005/04/08/permutations-of-all-subsets/</guid>
		<description><![CDATA[Another snippet to compute the permutations of all subsets.]]></description>
			<content:encoded><![CDATA[<p>Another <a href="http://labix.org/snippets/permutations">snippet</a> to compute the permutations of all subsets.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.labix.org/2005/04/08/permutations-of-all-subsets/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Permutations and derangements</title>
		<link>http://blog.labix.org/2005/03/29/permutations-and-derangements</link>
		<comments>http://blog.labix.org/2005/03/29/permutations-and-derangements#comments</comments>
		<pubDate>Tue, 29 Mar 2005 08:51:00 +0000</pubDate>
		<dc:creator>Gustavo Niemeyer</dc:creator>
				<category><![CDATA[Math]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Snippet]]></category>

		<guid isPermaLink="false">http://blog.labix.org/2005/03/29/permutations-and-derangements/</guid>
		<description><![CDATA[Two snippets to compute permuatations and derangements in Python.]]></description>
			<content:encoded><![CDATA[<p>Two <a href="http://labix.org/snippets/permutations">snippets</a> to compute permuatations and derangements in Python.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.labix.org/2005/03/29/permutations-and-derangements/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Toy interpreter for Linear Algebra</title>
		<link>http://blog.labix.org/2004/03/02/toy-interpreter-for-linear-algebra</link>
		<comments>http://blog.labix.org/2004/03/02/toy-interpreter-for-linear-algebra#comments</comments>
		<pubDate>Tue, 02 Mar 2004 06:43:00 +0000</pubDate>
		<dc:creator>Gustavo Niemeyer</dc:creator>
				<category><![CDATA[C/C++]]></category>
		<category><![CDATA[Math]]></category>
		<category><![CDATA[Project]]></category>

		<guid isPermaLink="false">http://blog.labix.org/2004/03/02/toy-interpreter-for-linear-algebra/</guid>
		<description><![CDATA[While working with Linear Algebra, I&#8217;ve decided to build a toy interpreter in C to play around. This was a quite interesting experiment for myself, since it was the first time I&#8217;ve built a complete (with tokenizer, compiler, and interpreter) &#8230; <a href="http://blog.labix.org/2004/03/02/toy-interpreter-for-linear-algebra">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>While working with Linear Algebra, I&#8217;ve decided to build a toy interpreter in C to play around. This was a quite interesting experiment for myself, since it was the first time I&#8217;ve built a complete (with tokenizer, compiler, and interpreter) and auto-suficient (no external dependencies, no additional tools) interpreter from the ground.</p>
<p>The interpreter is currently 1076 lines long, and is based on a tokenizer for the grammar, a compiler which creates a list of trees of expressions, an interpreter for the generated structure, and two modules for symbol maintenance and matrix operations.</p>
<p>Here is a quick example: </p>
<pre>
a = 2*3+4/2
print(a)

b = [1,2,3|4,5,6]
c = [1,2,3|4,5,6]
print((b+c)/2)
print(trans(b))

d = [1,0|-2,3|5,4|0,1]
e = [0,6,1|3,8,-2]
print(d*e)

f = [1,2|3,4]
print(det(f))
f = [2,3,4|-5,5,6|7,8,9]
print(det(f))
f = [1,-4,2,-2|4,7,-3,5|3,0,8,0|-5,-1,6,9]
print(det(f))
</pre>
<p>And here is the output:</p>
<pre>
8
[ 1, 2, 3 | 4, 5, 6 ]
[ 1, 4 | 2, 5 | 3, 6 ]
[ 0, 6, 1 | 9, 12, -8 | 12, 62, -3 | 3, 8, -2 ]
-2
-45
2042
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.labix.org/2004/03/02/toy-interpreter-for-linear-algebra/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

