<rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0">
  <channel>
    <title>MaplePrimes - answers and comments on Question, inconsisten numerical answers between evalf and plot</title>
    <link>http://www.mapleprimes.com/questions/40366-Inconsisten-Numerical-Answers-Between</link>
    <language>en-us</language>
    <copyright>2026 Maplesoft, A Division of Waterloo Maple Inc.</copyright>
    <generator>Maplesoft Document System</generator>
    <lastBuildDate>Fri, 12 Jun 2026 09:33:16 GMT</lastBuildDate>
    <pubDate>Fri, 12 Jun 2026 09:33:16 GMT</pubDate>
    <itunes:subtitle />
    <itunes:summary />
    <description>The latest answers and comments added to the Question, inconsisten numerical answers between evalf and plot</description>
    <image>
      <url>http://www.mapleprimes.com/images/mapleprimeswhite.jpg</url>
      <title>MaplePrimes - answers and comments on Question, inconsisten numerical answers between evalf and plot</title>
      <link>http://www.mapleprimes.com/questions/40366-Inconsisten-Numerical-Answers-Between</link>
    </image>
    <item>
      <title>Change Digits</title>
      <link>http://www.mapleprimes.com/questions/40366-Inconsisten-Numerical-Answers-Between?ref=Feed:MaplePrimes:inconsisten numerical answers between evalf and plot:Comments#answer74361</link>
      <itunes:summary>Your function is too wide for the screen.  Try evalf[20](ratio); (the 20 is the number of digits used in the numerical computation).</itunes:summary>
      <description>Your function is too wide for the screen.  Try evalf[20](ratio); (the 20 is the number of digits used in the numerical computation).</description>
      <guid>74361</guid>
      <pubDate>Sat, 15 Dec 2007 11:43:16 Z</pubDate>
      <itunes:author>Joe
 Riel
</itunes:author>
      <author>Joe
 Riel
</author>
    </item>
    <item>
      <title>start over ...</title>
      <link>http://www.mapleprimes.com/questions/40366-Inconsisten-Numerical-Answers-Between?ref=Feed:MaplePrimes:inconsisten numerical answers between evalf and plot:Comments#answer74360</link>
      <itunes:summary>Your expression is about 20 pages long and you seem to use 10 Digits
of precision. It sounds like brute force and it is very likely you
are killed by rounding errors.

Additionally it contains complex values, what should be plotted?
Try to plot x + I*1e-10 to see ...

Being not sure whether 'ratio' is a reserved word I call it the Ratio.

Now fnormal(theRatio) returns Float(undefined)*Pi*f0^2. This indicates
numerical division by 0 or a singularity with 'jumps'.

BTW: your variable seems to be actually Pi*f0.

If you want a reasonable answer you may want to upload a sheet or text
file showing the steps and not only the final result, so may get hints
how to proceed better.

PS: you also should edit your post (if possible) and delete your
expression, otherwise the replies may not be readable. </itunes:summary>
      <description>Your expression is about 20 pages long and you seem to use 10 Digits
of precision. It sounds like brute force and it is very likely you
are killed by rounding errors.

Additionally it contains complex values, what should be plotted?
Try to plot x + I*1e-10 to see ...

Being not sure whether 'ratio' is a reserved word I call it the Ratio.

Now fnormal(theRatio) returns Float(undefined)*Pi*f0^2. This indicates
numerical division by 0 or a singularity with 'jumps'.

BTW: your variable seems to be actually Pi*f0.

If you want a reasonable answer you may want to upload a sheet or text
file showing the steps and not only the final result, so may get hints
how to proceed better.

PS: you also should edit your post (if possible) and delete your
expression, otherwise the replies may not be readable. </description>
      <guid>74360</guid>
      <pubDate>Sat, 15 Dec 2007 15:11:02 Z</pubDate>
      <itunes:author>Axel Vogt</itunes:author>
      <author>Axel Vogt</author>
    </item>
    <item>
      <title>Precision</title>
      <link>http://www.mapleprimes.com/questions/40366-Inconsisten-Numerical-Answers-Between?ref=Feed:MaplePrimes:inconsisten numerical answers between evalf and plot:Comments#answer74359</link>
      <itunes:summary>As mentioned above, this is a precision issue.  The attached worksheet correlates with the answer from your plot.


&lt;a href='http://maplenet.maplesoft.com/maplenet/worksheet/mapleprimes/221_ratio.mw'&gt;View 221_ratio.mw on MapleNet&lt;/a&gt; or &lt;a href='http://www.mapleprimes.com/files/221_ratio.mw'&gt;Download 221_ratio.mw&lt;/a&gt;&lt;br/&gt;

&lt;em&gt;Regards,
Georgios Kokovidis
Dräger Medical&lt;/em&gt;

</itunes:summary>
      <description>As mentioned above, this is a precision issue.  The attached worksheet correlates with the answer from your plot.


&lt;a href='http://maplenet.maplesoft.com/maplenet/worksheet/mapleprimes/221_ratio.mw'&gt;View 221_ratio.mw on MapleNet&lt;/a&gt; or &lt;a href='http://www.mapleprimes.com/files/221_ratio.mw'&gt;Download 221_ratio.mw&lt;/a&gt;&lt;br/&gt;

&lt;em&gt;Regards,
Georgios Kokovidis
Dräger Medical&lt;/em&gt;

</description>
      <guid>74359</guid>
      <pubDate>Sat, 15 Dec 2007 17:06:34 Z</pubDate>
      <itunes:author>gkokovidis</itunes:author>
      <author>gkokovidis</author>
    </item>
    <item>
      <title>some dirty hack</title>
      <link>http://www.mapleprimes.com/questions/40366-Inconsisten-Numerical-Answers-Between?ref=Feed:MaplePrimes:inconsisten numerical answers between evalf and plot:Comments#answer74357</link>
      <itunes:summary>&lt;pre&gt;
naming your expression 'theRatio' the following might do:

  restart; interface(version);
  Digits:=30;
  read "D:\\_Work\\Maple_Work\\ratio.txt": # read from file
  length(theRatio): evalf[2](%/80/60);     # 19 pages
  indets(theRatio,atomic): indets(%);      # check: actual depends on f0 only
  fnormal(theRatio,14);                    # check: nonsense with low precision, needs at leat 16
  
  
  
  convert(theRatio, rational):
  eval(%, f0=g0/Pi):
  eval(%, g0=a^2):
  R:=%:
  ``;
  R1:=simplify(R,size): 
  #length(%): evalf[2](%/80/60);
  
  Digits:=16;
  evalf[16](R1): evalc(Re(%)):
  codegen[makeproc](%,a):
  p:=codegen[optimize] (%,tryhard):
  
  length(p(a)): evalf[2](%/80/60);
  
  
  #q:=proc(f0) p(sqrt(Pi*f0)); subs(pow=`^`,%); evalhf( % ) end proc;
  q:=proc(f0) subs( pow(1/(a^2),1/2) = 1/a,p(a)); subs(a=sqrt(Pi*f0),%); subs(pow=`^`,%); evalf( % ) end proc;
  q(5.0e9);
  
  
  #plots[semilogplot]('q'(f0),f0=5e9..1e12);
  plots[semilogplot]('q'(f0),f0=5e9..1e12,color=magenta,numpoints=1000,axis[1] =
  [tickmarks=[4,subticks=8]],axis[2] = [tickmarks=[4,subticks=5]],
  view=[1.0e9..1.0e12,0.40..1.00]);

&lt;/pre&gt;</itunes:summary>
      <description>&lt;pre&gt;
naming your expression 'theRatio' the following might do:

  restart; interface(version);
  Digits:=30;
  read "D:\\_Work\\Maple_Work\\ratio.txt": # read from file
  length(theRatio): evalf[2](%/80/60);     # 19 pages
  indets(theRatio,atomic): indets(%);      # check: actual depends on f0 only
  fnormal(theRatio,14);                    # check: nonsense with low precision, needs at leat 16
  
  
  
  convert(theRatio, rational):
  eval(%, f0=g0/Pi):
  eval(%, g0=a^2):
  R:=%:
  ``;
  R1:=simplify(R,size): 
  #length(%): evalf[2](%/80/60);
  
  Digits:=16;
  evalf[16](R1): evalc(Re(%)):
  codegen[makeproc](%,a):
  p:=codegen[optimize] (%,tryhard):
  
  length(p(a)): evalf[2](%/80/60);
  
  
  #q:=proc(f0) p(sqrt(Pi*f0)); subs(pow=`^`,%); evalhf( % ) end proc;
  q:=proc(f0) subs( pow(1/(a^2),1/2) = 1/a,p(a)); subs(a=sqrt(Pi*f0),%); subs(pow=`^`,%); evalf( % ) end proc;
  q(5.0e9);
  
  
  #plots[semilogplot]('q'(f0),f0=5e9..1e12);
  plots[semilogplot]('q'(f0),f0=5e9..1e12,color=magenta,numpoints=1000,axis[1] =
  [tickmarks=[4,subticks=8]],axis[2] = [tickmarks=[4,subticks=5]],
  view=[1.0e9..1.0e12,0.40..1.00]);

&lt;/pre&gt;</description>
      <guid>74357</guid>
      <pubDate>Sat, 15 Dec 2007 20:33:21 Z</pubDate>
      <itunes:author>Axel Vogt</itunes:author>
      <author>Axel Vogt</author>
    </item>
    <item>
      <title>Thanks very much  for your help!</title>
      <link>http://www.mapleprimes.com/questions/40366-Inconsisten-Numerical-Answers-Between?ref=Feed:MaplePrimes:inconsisten numerical answers between evalf and plot:Comments#answer74352</link>
      <itunes:summary>OK thanks everyone for pointing out the reason for the inconsistent numerical answers.  Sorry again for the really long expression on my post.  I am not too experienced in posting on this format.

I will perform calculations using evalf[20] as suggested.  

Cheers,

-Dan</itunes:summary>
      <description>OK thanks everyone for pointing out the reason for the inconsistent numerical answers.  Sorry again for the really long expression on my post.  I am not too experienced in posting on this format.

I will perform calculations using evalf[20] as suggested.  

Cheers,

-Dan</description>
      <guid>74352</guid>
      <pubDate>Sun, 16 Dec 2007 13:01:50 Z</pubDate>
      <itunes:author>tintin</itunes:author>
      <author>tintin</author>
    </item>
    <item>
      <title>precision</title>
      <link>http://www.mapleprimes.com/questions/40366-Inconsisten-Numerical-Answers-Between?ref=Feed:MaplePrimes:inconsisten numerical answers between evalf and plot:Comments#answer74350</link>
      <itunes:summary>You can see the effects of increasing &lt;maple&gt;Digits&lt;/maple&gt; using something like this:

&lt;pre&gt;
for d from 8 to 20 do evalf[d](eval(theRatio, f0=5e9)) end do;&lt;/pre&gt;
&lt;maple&gt;84.533996&lt;/maple&gt;
&lt;maple&gt;2.76902582&lt;/maple&gt;
&lt;maple&gt;0.3832106715&lt;/maple&gt;
&lt;maple&gt;0.45853662433&lt;/maple&gt;
&lt;maple&gt;0.456853381170&lt;/maple&gt;
&lt;maple&gt;0.4560144647218&lt;/maple&gt;
&lt;maple&gt;0.45601446472291&lt;/maple&gt;
&lt;maple&gt;0.456016978775341&lt;/maple&gt;
&lt;maple&gt;0.4560168949732729&lt;/maple&gt;
&lt;maple&gt;0.45601697877528942&lt;/maple&gt;
&lt;maple&gt;0.456016982965391820&lt;/maple&gt;
&lt;maple&gt;0.4560169819597674829&lt;/maple&gt;
&lt;maple&gt;0.45601698196814768301&lt;/maple&gt;


There is a related issue.  It might be that the constants in your expression need to be specified to greater precision, in order to get an accurate final answer.  As a partial test of this, I replaced each occurrence of 0.6666666666e-14 with ((2/3)*10^(-14)), and got the following:

&lt;maple&gt;96.518370&lt;/maple&gt;
&lt;maple&gt;2.76902582&lt;/maple&gt;
&lt;maple&gt;0.3832106715&lt;/maple&gt;
&lt;maple&gt;0.47576578081&lt;/maple&gt;
&lt;maple&gt;0.475765780540&lt;/maple&gt;
&lt;maple&gt;0.4740104054132&lt;/maple&gt;
&lt;maple&gt;0.47395785560670&lt;/maple&gt;
&lt;maple&gt;0.473963986083011&lt;/maple&gt;
&lt;maple&gt;0.4739638985041114&lt;/maple&gt;
&lt;maple&gt;0.47396393353565157&lt;/maple&gt;
&lt;maple&gt;0.473963946672481361&lt;/maple&gt;
&lt;maple&gt;0.4739639466724813721&lt;/maple&gt;
&lt;maple&gt;0.47396394663744982527&lt;/maple&gt;

Several other constants in your expression also appear to be truncations of exact numbers.  I do not believe that you can accurately evaluate the expression without increasing the precision of the constants.  (Where did the constants come from?)</itunes:summary>
      <description>You can see the effects of increasing &lt;maple&gt;Digits&lt;/maple&gt; using something like this:

&lt;pre&gt;
for d from 8 to 20 do evalf[d](eval(theRatio, f0=5e9)) end do;&lt;/pre&gt;
&lt;maple&gt;84.533996&lt;/maple&gt;
&lt;maple&gt;2.76902582&lt;/maple&gt;
&lt;maple&gt;0.3832106715&lt;/maple&gt;
&lt;maple&gt;0.45853662433&lt;/maple&gt;
&lt;maple&gt;0.456853381170&lt;/maple&gt;
&lt;maple&gt;0.4560144647218&lt;/maple&gt;
&lt;maple&gt;0.45601446472291&lt;/maple&gt;
&lt;maple&gt;0.456016978775341&lt;/maple&gt;
&lt;maple&gt;0.4560168949732729&lt;/maple&gt;
&lt;maple&gt;0.45601697877528942&lt;/maple&gt;
&lt;maple&gt;0.456016982965391820&lt;/maple&gt;
&lt;maple&gt;0.4560169819597674829&lt;/maple&gt;
&lt;maple&gt;0.45601698196814768301&lt;/maple&gt;


There is a related issue.  It might be that the constants in your expression need to be specified to greater precision, in order to get an accurate final answer.  As a partial test of this, I replaced each occurrence of 0.6666666666e-14 with ((2/3)*10^(-14)), and got the following:

&lt;maple&gt;96.518370&lt;/maple&gt;
&lt;maple&gt;2.76902582&lt;/maple&gt;
&lt;maple&gt;0.3832106715&lt;/maple&gt;
&lt;maple&gt;0.47576578081&lt;/maple&gt;
&lt;maple&gt;0.475765780540&lt;/maple&gt;
&lt;maple&gt;0.4740104054132&lt;/maple&gt;
&lt;maple&gt;0.47395785560670&lt;/maple&gt;
&lt;maple&gt;0.473963986083011&lt;/maple&gt;
&lt;maple&gt;0.4739638985041114&lt;/maple&gt;
&lt;maple&gt;0.47396393353565157&lt;/maple&gt;
&lt;maple&gt;0.473963946672481361&lt;/maple&gt;
&lt;maple&gt;0.4739639466724813721&lt;/maple&gt;
&lt;maple&gt;0.47396394663744982527&lt;/maple&gt;

Several other constants in your expression also appear to be truncations of exact numbers.  I do not believe that you can accurately evaluate the expression without increasing the precision of the constants.  (Where did the constants come from?)</description>
      <guid>74350</guid>
      <pubDate>Sun, 16 Dec 2007 17:57:39 Z</pubDate>
      <itunes:author>DJKeenan</itunes:author>
      <author>DJKeenan</author>
    </item>
  </channel>
</rss>