<rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0">
  <channel>
    <title>MaplePrimes - answers and comments on Question, Rounding with Fsolve</title>
    <link>http://www.mapleprimes.com/questions/143196-Rounding-With-Fsolve</link>
    <language>en-us</language>
    <copyright>2026 Maplesoft, A Division of Waterloo Maple Inc.</copyright>
    <generator>Maplesoft Document System</generator>
    <lastBuildDate>Tue, 09 Jun 2026 19:04:04 GMT</lastBuildDate>
    <pubDate>Tue, 09 Jun 2026 19:04:04 GMT</pubDate>
    <itunes:subtitle />
    <itunes:summary />
    <description>The latest answers and comments added to the Question, Rounding with Fsolve</description>
    <image>
      <url>http://www.mapleprimes.com/images/mapleprimeswhite.jpg</url>
      <title>MaplePrimes - answers and comments on Question, Rounding with Fsolve</title>
      <link>http://www.mapleprimes.com/questions/143196-Rounding-With-Fsolve</link>
    </image>
    <item>
      <title>assignment</title>
      <link>http://www.mapleprimes.com/questions/143196-Rounding-With-Fsolve?ref=Feed:MaplePrimes:Rounding with Fsolve:Comments#answer143197</link>
      <itunes:summary>&lt;p&gt;You've forgotten the colon in &lt;strong&gt;:=&lt;/strong&gt; when trying to assign to `Rounding`.&lt;/p&gt;
&lt;pre&gt;restart;

ans:=fsolve(sin(x)=0, x=2..4);

                          3.141592654

evalf[5](ans);

                             3.1416

Rounding:=-infinity:

evalf[5](ans);

                             3.1415
&lt;/pre&gt;
&lt;!--break--&gt;
&lt;p&gt;acer&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;You've forgotten the colon in &lt;strong&gt;:=&lt;/strong&gt; when trying to assign to `Rounding`.&lt;/p&gt;
&lt;pre&gt;restart;

ans:=fsolve(sin(x)=0, x=2..4);

                          3.141592654

evalf[5](ans);

                             3.1416

Rounding:=-infinity:

evalf[5](ans);

                             3.1415
&lt;/pre&gt;
&lt;!--break--&gt;
&lt;p&gt;acer&lt;/p&gt;</description>
      <guid>143197</guid>
      <pubDate>Thu, 07 Feb 2013 01:27:35 Z</pubDate>
      <itunes:author>acer</itunes:author>
      <author>acer</author>
    </item>
    <item>
      <title>Oops</title>
      <link>http://www.mapleprimes.com/questions/143196-Rounding-With-Fsolve?ref=Feed:MaplePrimes:Rounding with Fsolve:Comments#answer143206</link>
      <itunes:summary>&lt;p&gt;Opps, sorry I blamed fsolve for this. But I'm still getting an error on what I'm trying.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I solve two equations for two unkowns,&amp;nbsp;&lt;/p&gt;
&lt;pre&gt;soln:=fsolve({xp=X, yp=Y}, {t,theta}, t=(tn[n])..1000, theta=-Pi..Pi):&lt;/pre&gt;
&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre&gt;Then compute xp and X, xp and Y to double check and they give&lt;/pre&gt;
&lt;p&gt;xp= 0.7254021383&lt;/p&gt;
&lt;p&gt;X= &amp;nbsp;0.7254021381&lt;/p&gt;
&lt;p&gt;yp= -.7295245847&lt;/p&gt;
&lt;p&gt;Y = -.7295245853&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Shouldn't they be the same? Why is there so much error in them and how can I eliminate this? The forumlas for xp and X are&lt;/p&gt;
&lt;p&gt;xp:= x[n] + mag[n]*(t-tn[n])*cos(alpha[n]+phi[n]):&lt;/p&gt;
&lt;p&gt;X:= ( 1&amp;nbsp;+ 0.2*sin(t)*sin(2*theta) &amp;nbsp;) * cos(theta) ;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;Opps, sorry I blamed fsolve for this. But I'm still getting an error on what I'm trying.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I solve two equations for two unkowns,&amp;nbsp;&lt;/p&gt;
&lt;pre&gt;soln:=fsolve({xp=X, yp=Y}, {t,theta}, t=(tn[n])..1000, theta=-Pi..Pi):&lt;/pre&gt;
&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre&gt;Then compute xp and X, xp and Y to double check and they give&lt;/pre&gt;
&lt;p&gt;xp= 0.7254021383&lt;/p&gt;
&lt;p&gt;X= &amp;nbsp;0.7254021381&lt;/p&gt;
&lt;p&gt;yp= -.7295245847&lt;/p&gt;
&lt;p&gt;Y = -.7295245853&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Shouldn't they be the same? Why is there so much error in them and how can I eliminate this? The forumlas for xp and X are&lt;/p&gt;
&lt;p&gt;xp:= x[n] + mag[n]*(t-tn[n])*cos(alpha[n]+phi[n]):&lt;/p&gt;
&lt;p&gt;X:= ( 1&amp;nbsp;+ 0.2*sin(t)*sin(2*theta) &amp;nbsp;) * cos(theta) ;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;</description>
      <guid>143206</guid>
      <pubDate>Thu, 07 Feb 2013 04:26:38 Z</pubDate>
      <itunes:author>jschulzb</itunes:author>
      <author>jschulzb</author>
    </item>
    <item>
      <title>The errors accrue in eval after fsolve returns</title>
      <link>http://www.mapleprimes.com/questions/143196-Rounding-With-Fsolve?ref=Feed:MaplePrimes:Rounding with Fsolve:Comments#answer143212</link>
      <itunes:summary>&lt;p&gt;The answers you got from &lt;strong&gt;fsolve &lt;/strong&gt;are correct. The deviations accumulate because of round-off in the evaluation of &lt;strong&gt;xp&lt;/strong&gt;, &lt;strong&gt;X&lt;/strong&gt;, &lt;strong&gt;yp&lt;/strong&gt;, and &lt;strong&gt;Y&lt;/strong&gt;. That's just the nature of floating-point computations. The following example "tower" of computations at successively higher values of &lt;strong&gt;Digits&lt;/strong&gt; shows that each answer returned by &lt;strong&gt;fsolve &lt;/strong&gt;is correct to the requested number of digits, yet the "check" evaluation of the original equations is usually not accurate to that same number of digits.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;p1,p2,p3,p4:= seq(randpoly([x,y]), k= 1..4):&lt;/strong&gt;&lt;br&gt;&lt;strong&gt;for k from 3 to 15 by 2 do &lt;/strong&gt;&lt;br&gt;&lt;strong&gt;&amp;nbsp;&amp;nbsp; Digits:= k:&lt;/strong&gt;&lt;br&gt;&lt;strong&gt;&amp;nbsp;&amp;nbsp; soln:= fsolve({p1=p2, p3=p4}, {x,y});&lt;/strong&gt;&lt;br&gt;&lt;strong&gt;&amp;nbsp;&amp;nbsp; eval([p1,p2,p3,p4], soln)&lt;/strong&gt;&lt;br&gt;&lt;strong&gt;od;&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;Digits := 3&lt;br&gt;soln := {x = .448, y = -.492}&lt;br&gt;[-1.1, -1.1, -.99, -.999]&lt;br&gt;Digits := 5&lt;br&gt;soln := {x = .44765, y = -.49237}&lt;br&gt;[-1.138, -1.138, -1.0135, -1.0134]&lt;br&gt;Digits := 7&lt;br&gt;soln := {x = .4476498, y = -.4923714}&lt;br&gt;[-1.13839, -1.13838, -1.013304, -1.013301]&lt;br&gt;Digits := 9&lt;br&gt;soln := {x = .447649842, y = -.492371448}&lt;br&gt;[-1.1383856, -1.1383856, -1.01330066, -1.01330067]&lt;br&gt;Digits := 11&lt;br&gt;soln := {x = .44764984210, y = -.49237144750}&lt;br&gt;[-1.138385629, -1.138385629, -1.0133006602, -1.0133006606]&lt;br&gt;Digits := 13&lt;br&gt;soln := {x = .4476498420985, y = -.4923714475019}&lt;br&gt;[-1.13838562902, -1.13838562902, -1.013300660590, -1.013300660592]&lt;br&gt;Digits := 15&lt;br&gt;soln := {x = .447649842098485, y = -.492371447501895}&lt;br&gt;[-1.1383856290149, -1.1383856290149, -1.01330066059060, -1.01330066059061]&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;</itunes:summary>
      <description>&lt;p&gt;The answers you got from &lt;strong&gt;fsolve &lt;/strong&gt;are correct. The deviations accumulate because of round-off in the evaluation of &lt;strong&gt;xp&lt;/strong&gt;, &lt;strong&gt;X&lt;/strong&gt;, &lt;strong&gt;yp&lt;/strong&gt;, and &lt;strong&gt;Y&lt;/strong&gt;. That's just the nature of floating-point computations. The following example "tower" of computations at successively higher values of &lt;strong&gt;Digits&lt;/strong&gt; shows that each answer returned by &lt;strong&gt;fsolve &lt;/strong&gt;is correct to the requested number of digits, yet the "check" evaluation of the original equations is usually not accurate to that same number of digits.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;p1,p2,p3,p4:= seq(randpoly([x,y]), k= 1..4):&lt;/strong&gt;&lt;br&gt;&lt;strong&gt;for k from 3 to 15 by 2 do &lt;/strong&gt;&lt;br&gt;&lt;strong&gt;&amp;nbsp;&amp;nbsp; Digits:= k:&lt;/strong&gt;&lt;br&gt;&lt;strong&gt;&amp;nbsp;&amp;nbsp; soln:= fsolve({p1=p2, p3=p4}, {x,y});&lt;/strong&gt;&lt;br&gt;&lt;strong&gt;&amp;nbsp;&amp;nbsp; eval([p1,p2,p3,p4], soln)&lt;/strong&gt;&lt;br&gt;&lt;strong&gt;od;&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;Digits := 3&lt;br&gt;soln := {x = .448, y = -.492}&lt;br&gt;[-1.1, -1.1, -.99, -.999]&lt;br&gt;Digits := 5&lt;br&gt;soln := {x = .44765, y = -.49237}&lt;br&gt;[-1.138, -1.138, -1.0135, -1.0134]&lt;br&gt;Digits := 7&lt;br&gt;soln := {x = .4476498, y = -.4923714}&lt;br&gt;[-1.13839, -1.13838, -1.013304, -1.013301]&lt;br&gt;Digits := 9&lt;br&gt;soln := {x = .447649842, y = -.492371448}&lt;br&gt;[-1.1383856, -1.1383856, -1.01330066, -1.01330067]&lt;br&gt;Digits := 11&lt;br&gt;soln := {x = .44764984210, y = -.49237144750}&lt;br&gt;[-1.138385629, -1.138385629, -1.0133006602, -1.0133006606]&lt;br&gt;Digits := 13&lt;br&gt;soln := {x = .4476498420985, y = -.4923714475019}&lt;br&gt;[-1.13838562902, -1.13838562902, -1.013300660590, -1.013300660592]&lt;br&gt;Digits := 15&lt;br&gt;soln := {x = .447649842098485, y = -.492371447501895}&lt;br&gt;[-1.1383856290149, -1.1383856290149, -1.01330066059060, -1.01330066059061]&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;</description>
      <guid>143212</guid>
      <pubDate>Thu, 07 Feb 2013 09:24:26 Z</pubDate>
      <itunes:author>Carl Love</itunes:author>
      <author>Carl Love</author>
    </item>
  </channel>
</rss>