<?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>Code Library &#187; math</title>
	<atom:link href="http://www.ucosoft.com/tag/math/feed" rel="self" type="application/rss+xml" />
	<link>http://www.ucosoft.com</link>
	<description>Free Source Code and Program Tips</description>
	<lastBuildDate>Thu, 22 Jul 2010 05:17:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>A powerful math function parser(zz)</title>
		<link>http://www.ucosoft.com/a-powerful-math-function-parser.html</link>
		<comments>http://www.ucosoft.com/a-powerful-math-function-parser.html#comments</comments>
		<pubDate>Wed, 29 Nov 2006 16:12:30 +0000</pubDate>
		<dc:creator>hamo</dc:creator>
				<category><![CDATA[Win32/MFC]]></category>
		<category><![CDATA[Cpp]]></category>
		<category><![CDATA[How-to]]></category>
		<category><![CDATA[math]]></category>
		<category><![CDATA[parser]]></category>

		<guid isPermaLink="false">http://www.ucosoft.com/archives/46.html</guid>
		<description><![CDATA[by Andreas Jdger The inspiration to write this code was to have an easy-to-use parser for functions given as string. You have a string like cos(x)-7*x/(1+x) and you want to compute some values, maybe for displaying the graph of the function. You can write code like this: CFunction* fkt = CFunction::Parse(&#8220;cos(x)-7*x/(1+x)&#8221;); long double y = [...]]]></description>
			<content:encoded><![CDATA[<p> by <b>Andreas Jdger </b></P></p>
<p>The inspiration to write this code was to have an easy-to-use parser for functions given as string. You have a string like </P><br />
<coolcode linenum="no"><br />
cos(x)-7*x/(1+x)<br />
</coolcode><br />
<P><br />
and you want to compute some values, maybe for displaying the graph of the function. You can write code like this:</P><br />
<coolcode lang="cpp" linenum="no"><br />
CFunction<long double>* fkt =<br />
  CFunction<long double>::Parse(&#8220;cos(x)-7*x/(1+x)&#8221;);</p>
<p>long double y = fkt->Execute(1.5);<br />
</coolcode><br />
<P><br />
There are lots of definitions in the background, but the result is easy and fast! There is a one-time pasing step to construct the function tree, and function evaluations are only calls of standard math functions like sin, +, *, sqrt. When you want to know details about the implementaion, you should look into the source code. It would be too complex to describe the parsing algorithm here.<br />
</P></p>
<p><strong>Download here: <span id="more-46"></span></strong><br />
<!--adsense--><br />
<a href="/wp-content/download/FunctionParser_demo_app.zip">Download demo source</a><br />
<a href="/wp-content/download/FunctionParser_demo_src.zip">Download demo app</a></p>

	Tags: <strong><a href="http://www.ucosoft.com/tag/cpp" title="Cpp" rel="tag">Cpp</a>, <a href="http://www.ucosoft.com/tag/how-to" title="How-to" rel="tag">How-to</a>, <a href="http://www.ucosoft.com/tag/math" title="math" rel="tag">math</a>, <a href="http://www.ucosoft.com/tag/parser" title="parser" rel="tag">parser</a></strong><br />
]]></content:encoded>
			<wfw:commentRss>http://www.ucosoft.com/a-powerful-math-function-parser.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

