<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Graph Forums — Some trouble with the sum function.]]></title>
	<link rel="self" href="https://forum.padowan.dk/extern.php?action=feed&amp;tid=246&amp;type=atom"/>
	<updated>2011-03-23T23:30:00Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.padowan.dk/viewtopic.php?id=246</id>
		<entry>
			<title type="html"><![CDATA[Re: Some trouble with the sum function.]]></title>
			<link rel="alternate" href="https://forum.padowan.dk/viewtopic.php?pid=871#p871"/>
			<content type="html"><![CDATA[<p>Been looking for that fix! Thanks James!</p>]]></content>
			<author>
				<name><![CDATA[12EricPetterson]]></name>
				<uri>https://forum.padowan.dk/profile.php?id=13275</uri>
			</author>
			<updated>2011-03-23T23:30:00Z</updated>
			<id>https://forum.padowan.dk/viewtopic.php?pid=871#p871</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Some trouble with the sum function.]]></title>
			<link rel="alternate" href="https://forum.padowan.dk/viewtopic.php?pid=818#p818"/>
			<content type="html"><![CDATA[<p>Wow, brilliant. Thanks Ivan!</p><p>I can&#039;t thank you enough for creating this extremely useful piece of software.</p>]]></content>
			<author>
				<name><![CDATA[James]]></name>
				<uri>https://forum.padowan.dk/profile.php?id=12083</uri>
			</author>
			<updated>2011-03-08T04:05:16Z</updated>
			<id>https://forum.padowan.dk/viewtopic.php?pid=818#p818</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Some trouble with the sum function.]]></title>
			<link rel="alternate" href="https://forum.padowan.dk/viewtopic.php?pid=815#p815"/>
			<content type="html"><![CDATA[<div class="quotebox"><cite>James wrote:</cite><blockquote><p>Check out the file and this will all make more sense. Can anyone figure out what&#039;s going on here?</p></blockquote></div><p>There was a bug in Graph, which caused the sum function to fail when the expression in the first argument to sum was a function with more than one argument. I have now fixed it in the beta version.</p><div class="quotebox"><cite>James wrote:</cite><blockquote><p>I just noticed something else as well, functions with sum() can&#039;t be differentiated in graph, which is a bit odd; it seems like a perfectly straightforward function to differentiate. Wouldn&#039;t it just be the same sum over the derivative of the function in the first parameter?</p></blockquote></div><p>Well, straightforward is not the term I would have used. But you are right that it should be possible to differentiate the sum function, and I implemented that in the beta version now.</p><div class="quotebox"><cite>James wrote:</cite><blockquote><p>Also, graph doesn&#039;t seem to like to differentiate functions with fact() in them even if the variable the derivative is being taken with respect to isn&#039;t part of the factorial. For example:</p></blockquote></div><p>I never really considered that but it is very easy to fix and it is fixed now in the beta version.</p><p>You can find the latest beta version at <a href="http://www.padowan.dk/graph/Beta.php">http://www.padowan.dk/graph/Beta.php</a></p>]]></content>
			<author>
				<name><![CDATA[Ivan Johansen]]></name>
				<uri>https://forum.padowan.dk/profile.php?id=2</uri>
			</author>
			<updated>2011-03-07T20:46:40Z</updated>
			<id>https://forum.padowan.dk/viewtopic.php?pid=815#p815</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Some trouble with the sum function.]]></title>
			<link rel="alternate" href="https://forum.padowan.dk/viewtopic.php?pid=783#p783"/>
			<content type="html"><![CDATA[<p>I just noticed something else as well, functions with sum() can&#039;t be differentiated in graph, which is a bit odd; it seems like a perfectly straightforward function to differentiate. Wouldn&#039;t it just be the same sum over the derivative of the function in the first parameter?</p><p>Also, graph doesn&#039;t seem to like to differentiate functions with fact() in them even if the variable the derivative is being taken with respect to isn&#039;t part of the factorial. For example:</p><p>y(x)=fact(2)*x can&#039;t be differentiated, even though y(x)=2*x obviously can, and is the same function.</p><p>Are there any plans to make these improvements to the differentiating engine in graph?</p>]]></content>
			<author>
				<name><![CDATA[James]]></name>
				<uri>https://forum.padowan.dk/profile.php?id=12083</uri>
			</author>
			<updated>2011-02-26T04:36:07Z</updated>
			<id>https://forum.padowan.dk/viewtopic.php?pid=783#p783</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Some trouble with the sum function.]]></title>
			<link rel="alternate" href="https://forum.padowan.dk/viewtopic.php?pid=782#p782"/>
			<content type="html"><![CDATA[<p>Hello,</p><p>I&#039;m trying to use the sum function to sum a bunch of binomial distributions together, and the factorial functions seems to break when its used inside the sum function, at least in some situations. I have attached a file to illustrate the problem.</p><p>The first few functions in the file are an example of what I&#039;m trying to automate using the sum function. The custom functions in the file are:</p><p>1. nchoosek(n,k)&nbsp; the binomail coeficcient.<br />2. bin(k,n,p)&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; the binomial distribution for k successes in n trials, with p probability per trial. This uses the nchoosek function.<br />3. perbin(k,n,p)&nbsp; &nbsp; makes the probabilities into percents by passing p/100 to bin() and returning 100* the answer.<br />4. sums(n,k,p). This uses the sum function to sum the perbin function over values of k from 0 to k. The result is supposed to be the probability of achieving k or fewer successes in n trials.<br />5. sums2(k,n,p)&nbsp; &nbsp; Same as above, but instead of using nested functions, it&#039;s all in one giant lump in one function. This version actually works, despite the fact that it should be doing exactly the same thing as the above function.</p><p>Check out the file and this will all make more sense. Can anyone figure out what&#039;s going on here?</p><p>Thanks!<br />-James</p>]]></content>
			<author>
				<name><![CDATA[James]]></name>
				<uri>https://forum.padowan.dk/profile.php?id=12083</uri>
			</author>
			<updated>2011-02-26T02:41:22Z</updated>
			<id>https://forum.padowan.dk/viewtopic.php?pid=782#p782</id>
		</entry>
</feed>
