The precision of the argument function error message, graph not plotted

In summary, the precision of the argument function is causing problems when trying to plot graphs. I would recommend defining all constants to have 30 digits of precision, and increasing the precision of the variable x.
  • #1
jamie_m
14
0
"The precision of the argument function" error message, graph not plotted

I've got a function, integratedadvthirdaltb, that I'm trying to use in plotting some graphs:

thirdaltb[KP_, Ps_, C_, M_] :=
NSolve[Sqrt[2*M]*b +
InverseCDF[NormalDistribution[0, 1], Ps]*
Sqrt[4*(InverseCDF[NormalDistribution[0, 1], Ps]^2) +
4*Sqrt[2*M]*b + (2.785398163397448309616)*M] ==
KP*C - 2*(InverseCDF[NormalDistribution[0, 1], Ps]^2), b,
WorkingPrecision -> 20]

directadv[b_] := -Log2[1 - CDF[NormalDistribution[0, 1], b]]

integratedadvthirdaltb[KP_, Ps_, C_, M_] :=
directadv[b /. thirdaltb[KP, Ps, C, M]]

So far so good. However, the first graph I've tried to plot is giving me a lot of "The precision of the argument function ({6.6073 +4\ Sqrt[2]\ \
b+1.83842\ Sqrt[58.0856 +16\Sqrt[2]\b]}\\n) is less than \
WorkingPrecision" errors (in fact, that's not the only argument function that apparently has less than WorkingPrecision.) Having WorkingPrecision->20 in the definition of the thirdaltb function, I'm at a loss as to why I'm getting these errors.

That said, the first graph does get plotted. Here's the instruction to do so

LogLinearPlot[{integratedadvthirdaltb[x, 0.967, 2^(-5.35614381),
2^(4)]}, {x, 2^(9), 2^(13)}, AxesLabel -> {KPs, advantage},
PlotLabel ->
Style["HEYSFIRST6622NONLINEAR - theoretical advantage with Ps = \
0.97"], PlotRange -> {0, 12}, PlotStyle -> {Blue},
Ticks -> {{{2^(9), Superscript[2, Log2[2^(9)]]}, {2^(10),
Superscript[2, Log2[2^(10)]]}, {2^(11),
Superscript[2, Log2[2^(11)]]}, {2^(12),
Superscript[2, Log2[2^(12)]]}, {2^(13),
Superscript[2, Log2[2^(13)]]}}, Automatic},
WorkingPrecision -> 20]

The next graph I've tried to plot, however, is completely blank. Only the axes and heading/labels appear on screen. And I'm getting a lot more "The precision of the argument function ... is less than Working Precision" messages than I was for its predecessor:

LogLinearPlot[{integratedadvthirdaltb[x, 0.967, 2^(-8), 1]}, {x,
2^(9), 2^(13)}, AxesLabel -> {KPs, advantage},
PlotLabel ->
Style["CRYPRACTHREEFOURROUNDSTWELVEBITS - theoretical advantage \
with Ps = 0.97"], PlotRange -> {0, 12}, PlotStyle -> {Red},
Ticks -> {{{2^(9), Superscript[2, Log2[2^(9)]]}, {2^(10),
Superscript[2, Log2[2^(10)]]}, {2^(11),
Superscript[2, Log2[2^(11)]]}, {2^(12),
Superscript[2, Log2[2^(12)]]}, {2^(13),
Superscript[2, Log2[2^(13)]]}}, Automatic},
WorkingPrecision -> 20]

Does anyone have any idea as to where I'm going wrong and what I should do to fix it?

Thanks!

James McLaughlin.
 
Physics news on Phys.org
  • #2


I looked through the code and it seems that there are several sources of reduced precision. First, you have several imprecise constants defined, such as 0.967. I would go through and define each constant to have 30 digits of precision, like 0.967`30.

The other source of imprecision is the variable x. Even though you have defined the endpoints with exact expressions, x gets demoted down to $MachinePrecision while plotting points on the interior of the range. The way to overcome that is to explicitly increase its precision

LogLinearPlot[{integratedadvthirdaltb[SetPrecision[x, 30], 0.967`30,
2^(-5.35614381`30), 2^(4)]}...
 

1. What causes the "graph not plotted" error message to appear?

The most common cause of this error message is an invalid input or missing data in the argument function. This could be due to a typo in the equation, incorrect data format, or missing values.

2. How can I fix the "graph not plotted" error?

To fix this error, you should carefully check your argument function for any errors or missing data. Make sure the equation is correctly written and all necessary data is included. You may also need to check for any restrictions or limitations on the graphing software being used.

3. Can the precision of the argument function affect the appearance of the graph?

Yes, the precision of the argument function can affect the overall shape and accuracy of the graph. If the function is not precise enough, it may result in a distorted or incorrect graph.

4. How can I improve the precision of my argument function?

To improve the precision of your argument function, you can increase the number of data points or use more precise mathematical functions. Additionally, double-checking your input and using more advanced graphing software can also help improve the precision.

5. Is it possible to get the "graph not plotted" error even with a precise argument function?

Yes, it is possible to still get this error message even with a precise argument function. This could be due to limitations of the graphing software, such as not being able to handle extremely large or complex functions. In this case, you may need to use a different software or find a workaround for the limitation.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
12
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
3K
  • Engineering and Comp Sci Homework Help
Replies
2
Views
1K
Replies
1
Views
6K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
4K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
5K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
7K
Back
Top