<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Factorial in Oracle SQL &#8211; using both new Recursive Subquery and classic Connect By approach</title>
	<atom:link href="http://technology.amis.nl/2011/12/13/factorial-in-oracle-sql-using-both-new-recursive-subquery-and-classic-connect-by-approach-2/feed/" rel="self" type="application/rss+xml" />
	<link>http://technology.amis.nl/2011/12/13/factorial-in-oracle-sql-using-both-new-recursive-subquery-and-classic-connect-by-approach-2/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=factorial-in-oracle-sql-using-both-new-recursive-subquery-and-classic-connect-by-approach-2</link>
	<description></description>
	<lastBuildDate>Tue, 11 Jun 2013 22:09:58 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
	<item>
		<title>By: Laurent Schneider</title>
		<link>http://technology.amis.nl/2011/12/13/factorial-in-oracle-sql-using-both-new-recursive-subquery-and-classic-connect-by-approach-2/#comment-6947</link>
		<dc:creator>Laurent Schneider</dc:creator>
		<pubDate>Tue, 13 Dec 2011 14:08:13 +0000</pubDate>
		<guid isPermaLink="false">http://technology.amis.nl/blog/?p=14427#comment-6947</guid>
		<description><![CDATA[indeed the logarythm of the product is the sum of the logarythms.Â 
And exp(ln(x))=xÂ 
Then exp(ln(x1*x2*x3))=exp(ln(x1)+ln(x2)+ln(x3))=exp(sum(ln(x)))

I have not been to conferences for a while. But next time you come to Switzerland drop me a line :-)]]></description>
		<content:encoded><![CDATA[<p>indeed the logarythm of the product is the sum of the logarythms.Â <br />
And exp(ln(x))=xÂ <br />
Then exp(ln(x1*x2*x3))=exp(ln(x1)+ln(x2)+ln(x3))=exp(sum(ln(x)))</p>
<p>I have not been to conferences for a while. But next time you come to Switzerland drop me a line <img src='http://technology.amis.nl/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stew Ashton</title>
		<link>http://technology.amis.nl/2011/12/13/factorial-in-oracle-sql-using-both-new-recursive-subquery-and-classic-connect-by-approach-2/#comment-6946</link>
		<dc:creator>Stew Ashton</dc:creator>
		<pubDate>Tue, 13 Dec 2011 12:13:39 +0000</pubDate>
		<guid isPermaLink="false">http://technology.amis.nl/blog/?p=14427#comment-6946</guid>
		<description><![CDATA[Laurent often comes up with neat tricks like this :)
I had to look this up, and I found a layman&#039;s explanation in http://en.wikipedia.org/wiki/Natural_logarithm
ln(xy) = ln(x) + ln(y)
So Laurent is actually multiplying the logarithms of 1, 2, 3, etc. by adding them. Then the exponent is just the logarithm in reverse to get back the real value he wants.]]></description>
		<content:encoded><![CDATA[<p>Laurent often comes up with neat tricks like this <img src='http://technology.amis.nl/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
I had to look this up, and I found a layman&#8217;s explanation in <a href="http://en.wikipedia.org/wiki/Natural_logarithm" rel="nofollow">http://en.wikipedia.org/wiki/Natural_logarithm</a><br />
ln(xy) = ln(x) + ln(y)<br />
So Laurent is actually multiplying the logarithms of 1, 2, 3, etc. by adding them. Then the exponent is just the logarithm in reverse to get back the real value he wants.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lucas Jellema</title>
		<link>http://technology.amis.nl/2011/12/13/factorial-in-oracle-sql-using-both-new-recursive-subquery-and-classic-connect-by-approach-2/#comment-6945</link>
		<dc:creator>Lucas Jellema</dc:creator>
		<pubDate>Tue, 13 Dec 2011 11:23:04 +0000</pubDate>
		<guid isPermaLink="false">http://technology.amis.nl/blog/?p=14427#comment-6945</guid>
		<description><![CDATA[&lt;p&gt;Hi Laurent,&lt;/p&gt;
&lt;p&gt;Thanks - that one works as well. Although I am not sure why exp(sum(ln( n))) gives the factorial. I suppose the Maths behind this is beyond me. I just was looking for a demonstration of recursive-ness...&lt;/p&gt;
&lt;p&gt;How are you doing by the way? Will I meet you again one of these days on a conference somewhere?&lt;/p&gt;
&lt;p&gt;Lucas&lt;/p&gt;]]></description>
		<content:encoded><![CDATA[<p>Hi Laurent,</p>
<p>Thanks &#8211; that one works as well. Although I am not sure why exp(sum(ln( n))) gives the factorial. I suppose the Maths behind this is beyond me. I just was looking for a demonstration of recursive-ness&#8230;</p>
<p>How are you doing by the way? Will I meet you again one of these days on a conference somewhere?</p>
<p>Lucas</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Laurent Schneider</title>
		<link>http://technology.amis.nl/2011/12/13/factorial-in-oracle-sql-using-both-new-recursive-subquery-and-classic-connect-by-approach-2/#comment-6944</link>
		<dc:creator>Laurent Schneider</dc:creator>
		<pubDate>Tue, 13 Dec 2011 11:11:47 +0000</pubDate>
		<guid isPermaLink="false">http://technology.amis.nl/blog/?p=14427#comment-6944</guid>
		<description><![CDATA[alternatively :

&lt;code&gt;
SQL&gt; select rownum,exp(sum(ln(rownum)) over (order by rownum)) from dual connect by level&lt;10;
Â Â Â  ROWNUM EXP(SUM(LN(ROWNUM))OVER(ORDERBYROWNUM))
---------- ---------------------------------------
Â Â Â Â Â Â Â Â  1Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  1
Â Â Â Â Â Â Â Â  2Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  2
Â Â Â Â Â Â Â Â  3Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  6
Â Â Â Â Â Â Â Â  4Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  24
Â Â Â Â Â Â Â Â  5Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  120
Â Â Â Â Â Â Â Â  6Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  720
Â Â Â Â Â Â Â Â  7Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  5040
Â Â Â Â Â Â Â Â  8Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  40320
Â Â Â Â Â Â Â Â  9Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  362880
&lt;/code&gt;]]></description>
		<content:encoded><![CDATA[<p>alternatively :</p>
<p>&lt;code&gt;<br />
SQL&gt; select rownum,exp(sum(ln(rownum)) over (order by rownum)) from dual connect by level&lt;10;<br />
Â Â Â  ROWNUM EXP(SUM(LN(ROWNUM))OVER(ORDERBYROWNUM))<br />
&#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
Â Â Â Â Â Â Â Â  1Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  1<br />
Â Â Â Â Â Â Â Â  2Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  2<br />
Â Â Â Â Â Â Â Â  3Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  6<br />
Â Â Â Â Â Â Â Â  4Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  24<br />
Â Â Â Â Â Â Â Â  5Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  120<br />
Â Â Â Â Â Â Â Â  6Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  720<br />
Â Â Â Â Â Â Â Â  7Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  5040<br />
Â Â Â Â Â Â Â Â  8Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  40320<br />
Â Â Â Â Â Â Â Â  9Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  362880<br />
&lt;/code&gt;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gerwin Hendriksen</title>
		<link>http://technology.amis.nl/2011/12/13/factorial-in-oracle-sql-using-both-new-recursive-subquery-and-classic-connect-by-approach-2/#comment-6943</link>
		<dc:creator>Gerwin Hendriksen</dc:creator>
		<pubDate>Tue, 13 Dec 2011 10:49:23 +0000</pubDate>
		<guid isPermaLink="false">http://technology.amis.nl/blog/?p=14427#comment-6943</guid>
		<description><![CDATA[Hi Lucas, it is nice to see that you actually programmed the factorial in SQL. I use a PL/SQL function to do the same thing and saw that a lot of the examples on the internet don&#039;t correct for the factorial of zero to be one. When I used the factorial to program the Erlang-C formula in PL/SQL I found out that the factorial is not part of standard SQL. I think it might be a nice enhancement for Oracle SQL to make the factorial standard SQL.
Regards, Gerwin]]></description>
		<content:encoded><![CDATA[<p>Hi Lucas, it is nice to see that you actually programmed the factorial in SQL. I use a PL/SQL function to do the same thing and saw that a lot of the examples on the internet don&#8217;t correct for the factorial of zero to be one. When I used the factorial to program the Erlang-C formula in PL/SQL I found out that the factorial is not part of standard SQL. I think it might be a nice enhancement for Oracle SQL to make the factorial standard SQL.<br />
Regards, Gerwin</p>
]]></content:encoded>
	</item>
</channel>
</rss>
