<?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: A random collection of bugs in Mathematica 7 and 7.0.1</title>
	<atom:link href="http://www.walkingrandomly.com/?feed=rss2&#038;p=801" rel="self" type="application/rss+xml" />
	<link>http://www.walkingrandomly.com/?p=801</link>
	<description>Because it's more fun than getting there in a straight line.</description>
	<lastBuildDate>Sun, 05 Sep 2010 12:28:36 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Mike Croucher</title>
		<link>http://www.walkingrandomly.com/?p=801&#038;cpage=1#comment-24399</link>
		<dc:creator>Mike Croucher</dc:creator>
		<pubDate>Sat, 15 May 2010 19:24:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.walkingrandomly.com/?p=801#comment-24399</guid>
		<description>Hi Grant

You are correct.  I copied the &#039;correct expression&#039; from Maple and from my own testing it appears that you are right concerning the different conventions between the two packages.  

Let&#039;s take x=2 for example.  In Mathematica 7.0 I get the result of 0.706094 for the integrand using NIntegrate but my &#039;correct expression&#039; evaluates to 0.799487 at x=2.  oops!  

However, if you evaluate the &#039;correct expression&#039; for x=2 in Maple 13 then you get 0.706094 which agrees with Mathematica&#039;s NIntegrate.

So, the &#039;correct expression&#039; is correct if you use Maple&#039;s definition of EllipticK but it is incorrect if you use Mathematica&#039;s.  Furthermore, I need to check my work more carefully in future.  It&#039;s still a Mathematica 7 bug for Integrate though :)

I&#039;ll leave the article as it stands so that the comments make sense in the future.  Well spotted and thanks for commenting.

Cheers,
Mike

PS.  I also note that I didn&#039;t swap Maple&#039;s EllipticK() to Mathematica&#039;s EllipticK[].  I was clearly having a bad day!</description>
		<content:encoded><![CDATA[<p>Hi Grant</p>
<p>You are correct.  I copied the &#8216;correct expression&#8217; from Maple and from my own testing it appears that you are right concerning the different conventions between the two packages.  </p>
<p>Let&#8217;s take x=2 for example.  In Mathematica 7.0 I get the result of 0.706094 for the integrand using NIntegrate but my &#8216;correct expression&#8217; evaluates to 0.799487 at x=2.  oops!  </p>
<p>However, if you evaluate the &#8216;correct expression&#8217; for x=2 in Maple 13 then you get 0.706094 which agrees with Mathematica&#8217;s NIntegrate.</p>
<p>So, the &#8216;correct expression&#8217; is correct if you use Maple&#8217;s definition of EllipticK but it is incorrect if you use Mathematica&#8217;s.  Furthermore, I need to check my work more carefully in future.  It&#8217;s still a Mathematica 7 bug for Integrate though <img src='http://www.walkingrandomly.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I&#8217;ll leave the article as it stands so that the comments make sense in the future.  Well spotted and thanks for commenting.</p>
<p>Cheers,<br />
Mike</p>
<p>PS.  I also note that I didn&#8217;t swap Maple&#8217;s EllipticK() to Mathematica&#8217;s EllipticK[].  I was clearly having a bad day!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Grant Keady</title>
		<link>http://www.walkingrandomly.com/?p=801&#038;cpage=1#comment-24187</link>
		<dc:creator>Grant Keady</dc:creator>
		<pubDate>Wed, 12 May 2010 09:13:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.walkingrandomly.com/?p=801#comment-24187</guid>
		<description>While I can see there is an Integrate bug in your &quot;Integrate bug 1&quot;, I&#039;m not sure 
that your &quot;correct expression&quot; (as I read it on 12 May 2010) is &quot;correct&quot;.
The numbers seem to differ from what one gets from NIntegrate.
I noted elsewhere that there appear to have been different conventions in Maple and
Mathematica concerning the EllipticK function.
(I was asked by SIAM to do a book review, but I don&#039;t think it will be published...) 
http://school.maths.uwa.edu.au/~keady/CAS/siam10keady2.pdf

I haven&#039;t checked in detail, and I could have made a mistake, or the cut-and-paste
from the web page into Mathematica might have some subtle error.
Would like you to check.   Thanks</description>
		<content:encoded><![CDATA[<p>While I can see there is an Integrate bug in your &#8220;Integrate bug 1&#8243;, I&#8217;m not sure<br />
that your &#8220;correct expression&#8221; (as I read it on 12 May 2010) is &#8220;correct&#8221;.<br />
The numbers seem to differ from what one gets from NIntegrate.<br />
I noted elsewhere that there appear to have been different conventions in Maple and<br />
Mathematica concerning the EllipticK function.<br />
(I was asked by SIAM to do a book review, but I don&#8217;t think it will be published&#8230;)<br />
<a href="http://school.maths.uwa.edu.au/~keady/CAS/siam10keady2.pdf" rel="nofollow">http://school.maths.uwa.edu.au/~keady/CAS/siam10keady2.pdf</a></p>
<p>I haven&#8217;t checked in detail, and I could have made a mistake, or the cut-and-paste<br />
from the web page into Mathematica might have some subtle error.<br />
Would like you to check.   Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sander Huisman</title>
		<link>http://www.walkingrandomly.com/?p=801&#038;cpage=1#comment-17643</link>
		<dc:creator>Sander Huisman</dc:creator>
		<pubDate>Tue, 24 Nov 2009 21:38:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.walkingrandomly.com/?p=801#comment-17643</guid>
		<description>Another bug, but was known (according to Rob Raguet-Schofield, Twitter: @ragfield):

\[Alpha] // TeXForm
\[Beta] // TeXForm
(or anything expression for that matter)

only outputs the last one. 
Same holds for CForm and FortranForm (probably they internally use the same mechanism...)</description>
		<content:encoded><![CDATA[<p>Another bug, but was known (according to Rob Raguet-Schofield, Twitter: @ragfield):</p>
<p>\[Alpha] // TeXForm<br />
\[Beta] // TeXForm<br />
(or anything expression for that matter)</p>
<p>only outputs the last one.<br />
Same holds for CForm and FortranForm (probably they internally use the same mechanism&#8230;)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sander Huisman</title>
		<link>http://www.walkingrandomly.com/?p=801&#038;cpage=1#comment-17642</link>
		<dc:creator>Sander Huisman</dc:creator>
		<pubDate>Tue, 24 Nov 2009 21:32:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.walkingrandomly.com/?p=801#comment-17642</guid>
		<description>@Mike

Luckily it is correct if you put 0 instead of 0.    Who works with inexact numbers anyways ;-)  :-)</description>
		<content:encoded><![CDATA[<p>@Mike</p>
<p>Luckily it is correct if you put 0 instead of 0.    Who works with inexact numbers anyways <img src='http://www.walkingrandomly.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />   <img src='http://www.walkingrandomly.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike Croucher</title>
		<link>http://www.walkingrandomly.com/?p=801&#038;cpage=1#comment-17627</link>
		<dc:creator>Mike Croucher</dc:creator>
		<pubDate>Tue, 24 Nov 2009 09:44:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.walkingrandomly.com/?p=801#comment-17627</guid>
		<description>@Sander I hadn&#039;t looked at it like that but you are right.  It&#039;s all a bit strange.

@Szabolcs - I agree, the occasional bug in Integrate is not surprising but still worth reporting I feel.  They might never get fixed otherwise :)  The RandomReal bug is very interesting!  Thanks for letting me know abut it!

Cheers,
Mike</description>
		<content:encoded><![CDATA[<p>@Sander I hadn&#8217;t looked at it like that but you are right.  It&#8217;s all a bit strange.</p>
<p>@Szabolcs &#8211; I agree, the occasional bug in Integrate is not surprising but still worth reporting I feel.  They might never get fixed otherwise <img src='http://www.walkingrandomly.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />   The RandomReal bug is very interesting!  Thanks for letting me know abut it!</p>
<p>Cheers,<br />
Mike</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Szabolcs</title>
		<link>http://www.walkingrandomly.com/?p=801&#038;cpage=1#comment-17612</link>
		<dc:creator>Szabolcs</dc:creator>
		<pubDate>Mon, 23 Nov 2009 20:25:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.walkingrandomly.com/?p=801#comment-17612</guid>
		<description>I think that the bugs that are really worth mentioning are the surprising ones.  An incorrect answer to a symbolic definite integral shouldn&#039;t surprise anyone who has some experience with CASs.  But a bug in a function like Sort[] or Tally[] is something really bad simply because it&#039;s unexpected...  Mathematica 6 had a nasty Tally bug. (It appeared only when a custom comparison function was used.)  It&#039;s fixed in 7.</description>
		<content:encoded><![CDATA[<p>I think that the bugs that are really worth mentioning are the surprising ones.  An incorrect answer to a symbolic definite integral shouldn&#8217;t surprise anyone who has some experience with CASs.  But a bug in a function like Sort[] or Tally[] is something really bad simply because it&#8217;s unexpected&#8230;  Mathematica 6 had a nasty Tally bug. (It appeared only when a custom comparison function was used.)  It&#8217;s fixed in 7.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Szabolcs</title>
		<link>http://www.walkingrandomly.com/?p=801&#038;cpage=1#comment-17611</link>
		<dc:creator>Szabolcs</dc:creator>
		<pubDate>Mon, 23 Nov 2009 20:18:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.walkingrandomly.com/?p=801#comment-17611</guid>
		<description>Integration and taking limits can be complicated, and the validity of some of the steps these functions make during calculations can depend on difficult-to-impossible to test assumptions.  So the occasional bug is not that surprising here.  The FullSimplify bug is a bit more shocking than these.  And here&#039;s one that was really unexpected for me:

http://groups.google.com/group/comp.soft-sys.math.mathematica/browse_frm/thread/8a43649367ebcc21#

In the example that was posted, Maximize[] re-seeds the RNG, so it&#039;ll always give the same sequence.  That&#039;s nasty.</description>
		<content:encoded><![CDATA[<p>Integration and taking limits can be complicated, and the validity of some of the steps these functions make during calculations can depend on difficult-to-impossible to test assumptions.  So the occasional bug is not that surprising here.  The FullSimplify bug is a bit more shocking than these.  And here&#8217;s one that was really unexpected for me:</p>
<p><a href="http://groups.google.com/group/comp.soft-sys.math.mathematica/browse_frm/thread/8a43649367ebcc21#" rel="nofollow">http://groups.google.com/group/comp.soft-sys.math.mathematica/browse_frm/thread/8a43649367ebcc21#</a></p>
<p>In the example that was posted, Maximize[] re-seeds the RNG, so it&#8217;ll always give the same sequence.  That&#8217;s nasty.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sander Huisman</title>
		<link>http://www.walkingrandomly.com/?p=801&#038;cpage=1#comment-17604</link>
		<dc:creator>Sander Huisman</dc:creator>
		<pubDate>Mon, 23 Nov 2009 17:54:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.walkingrandomly.com/?p=801#comment-17604</guid>
		<description>The first is the most interesting, as you give an inexact (approximate) input, that yields an exact (non-correct) output !</description>
		<content:encoded><![CDATA[<p>The first is the most interesting, as you give an inexact (approximate) input, that yields an exact (non-correct) output !</p>
]]></content:encoded>
	</item>
</channel>
</rss>
