In order to speed up the memoization of data generated via NIntegrate, a possible approach is to use Compile on both NIntegrate function and the function itself separately. How can one set the WorkingPrecision, PrecisionGoal and AccuracyGoal of a compiled function like the example presented below?

cf = Compile[{{x, _Real}}, Sin[x] + x^2 - 1/(1 + x)]
  • 7
    $\begingroup$ Compile only works with machine number reals, so there is no notion of WorkingPrecision. $\endgroup$ – Carl Woll Sep 21 '17 at 19:28

Browse other questions tagged or ask your own question.