<?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>Tech Notes &#187; Math</title>
	<atom:link href="http://www.ryannitz.org/tech-notes/tag/math/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ryannitz.org/tech-notes</link>
	<description>Miscellaneous technology examples and notes</description>
	<lastBuildDate>Sun, 03 Apr 2011 16:48:09 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
<image>
  <link>http://www.ryannitz.org/tech-notes</link>
  <url>http://ryan-nitz/favicon.ico</url>
  <title>Tech Notes</title>
</image>
		<item>
		<title>MySQL and Negative Infinity</title>
		<link>http://www.ryannitz.org/tech-notes/2009/01/19/mysql-and-negative-infinity/</link>
		<comments>http://www.ryannitz.org/tech-notes/2009/01/19/mysql-and-negative-infinity/#comments</comments>
		<pubDate>Tue, 20 Jan 2009 02:12:09 +0000</pubDate>
		<dc:creator>Ryan</dc:creator>
				<category><![CDATA[Examples]]></category>
		<category><![CDATA[Math]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://leisuremech.com/?p=118</guid>
		<description><![CDATA[Storing and retrieving negative infinity in a MySQL database is accomplished by inserting an arbitrarily large negative number.  Negative infinity is handy when storing default values in a database. The following SQL statement is an example of inserting negative infinity: INSERT INTO test(negative_infinity) VALUES('-1e500'); Here is the test table: CREATE TABLE test (      negative_infinity [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-15" title="mysql" src="http://www.ryannitz.org/tech-notes/wp-content/uploads/2008/06/mysql.jpeg" alt="mysql" width="124" height="90" /></p>
<p>Storing and retrieving <a href="http://en.wiktionary.org/wiki/infinity" target="_blank">negative infinity</a> in a MySQL database is accomplished by inserting an arbitrarily large negative number.  Negative infinity is handy when storing default values in a database.</p>
<p>The following SQL statement is an example of inserting negative infinity:</p>
<pre>INSERT INTO test(negative_infinity) VALUES('-1e500');</pre>
<p>Here is the test table:</p>
<pre>CREATE TABLE test (
     negative_infinity DOUBLE NOT NULL
) ENGINE=INNODB character set utf8;</pre>
<p>The value in the database is stored as the maximum negative value for the data type, double (-1.79769313486232e+308).</p>
<pre>mysql&gt; select * from test;
+------------------------+
| negative_infinity      |
+------------------------+
| -1.79769313486232e+308 |
+------------------------+
1 row in set (0.00 sec)</pre>
<p>In Java, the <a href="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Double.html" target="_blank">Double contsant</a> for max infinity, directly correlates to the value stored by MySQL.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ryannitz.org/tech-notes/2009/01/19/mysql-and-negative-infinity/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

