I have a function, say

minimizeme[ω_][β_][ϵ_] = ϵ^2 ω-Log[2 (Cosh[2 β]+Cosh[2 β ϵ])]/(2 β);

I want to make a high-precision dynamic ContourPlot of it using:

plottricrit[ω_] := ContourPlot[
 D[minimizeme[ω][β][ϵ], ϵ] == 0,
 {β, 0.5, 1.0},
 {ϵ, -3, 3},
 Evaluated -> True, 
 ContourStyle -> Thick, 
 RegionFunction -> Function[
    {β, ϵ}, 
    minimizeme[ω][β][ϵ] < minimizeme[ω][β][0]],
 ImageSize -> Large, 
 PerformanceGoal -> Accuracy,
 WorkingPrecision -> 60]


However, I keep running into a ContourPlot::precw message which tells me that

The precision of the argument function (...) is less than WorkingPrecision.

I have tried several ways to set the right precision (i.e., using With to inject a higher $MachinePrecision, using SetPrecision, using Rationalize, etc.), but I can't seem to get rid of this error. What is the right way to deal with it?


1 Answer 1


New method

I found that using a step value that is arbitrary precision also works:

Manipulate[plottricrit[ω], {ω, 0.217`60, 0.22545`60, 1`60*^-6}]

Old method

For reference this was my original answer, which also works but is less clean:

plottricrit[ω0_] := With[{ω = SetPrecision[ω0, 100]},
   ContourPlot[D[minimizeme[ω][β][ϵ], ϵ] == 0, {β, 0.5, 1.},
   {ϵ, -3, 3}, Evaluated -> True, ContourStyle -> Thick,
   RegionFunction -> Function[{β, ϵ}, minimizeme[ω][β][ϵ] < minimizeme[ω][β][0]],
   ImageSize -> Large, PerformanceGoal -> Accuracy, WorkingPrecision -> 60]
  • $\begingroup$ Won't SetPrecision get me "virtual" precision? $\endgroup$ Jul 24, 2012 at 14:28
  • 2
    $\begingroup$ @Andrea I'm sorry, I didn't read your question well enough; I was too busy editing in the Greek letters (I do wish there was a simple way to do that automatically). Yes, this would be "fake" precision, but given that it is originating from a slider I don't see why that matters. What am I missing? $\endgroup$
    – Mr.Wizard
    Jul 24, 2012 at 14:30
  • $\begingroup$ Yeah, you are right. I hadn't thought about that. Since it is an input value, it is only as good as I can input it, and as it stands I can still use higher precision numbers via the input field under the slider if needed. Thanks! So, basically, there is no way to tell the Manipulate function to feed higher-precision numbers to its arguments "internally". Is this right? $\endgroup$ Jul 24, 2012 at 14:46
  • $\begingroup$ @Mr.Wizard a nice palette for conversion? $\endgroup$ Jul 24, 2012 at 19:11
  • $\begingroup$ @Mr.Wizard I usually hate questions with non ascii symbols. Makes more difficult to work with the answers. I am thinking of a palette that when some text is selected and a button pressed changes all greek symbols into something ascii $\endgroup$ Jul 25, 2012 at 3:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.