({{, (RefLink[Compiled, paclet:ref/Compiled])
is an option for various numerical and plotting functions which specifies whether the expressions they work with should automatically be compiled. }})

OpenersNotesSection(Spacer1)Details

(RefLink[Compiled, paclet:ref/Compiled])->(RefLink[True, paclet:ref/True]) automatically creates compiled functions.

You should set (RefLink[Compiled, paclet:ref/Compiled])->(RefLink[False, paclet:ref/False]) if you need to use high-precision numbers.

OpenersPrimaryExamplesSection(Spacer1)Examples  (1)

OpenersExampleSection0(Spacer1)Basic Examples  (1)

On rare occasions, machine-number compilation may produce unexpected results:

FindRoot[If[1/(1+Exp[x])==0,0,-1]+x/900,{x,0,1000}]

By default, the function is compiled by (RefLink[FindRoot, paclet:ref/FindRoot]), so that machine overflow and underflow are not caught:

cf=Compile[{{x,_Real}},If[1/(1+Exp[x])==0,0,-1]+x/900];Plot[cf[x],{x,0,1000}]

Use (RefLink[Compiled, paclet:ref/Compiled])->(RefLink[False, paclet:ref/False]) to prevent this:

FindRoot[If[1/(1+Exp[x])==0,0,-1]+x/900,{x,0,1000},Compiled->False]

Plot[If[1/(1+Exp[x])==0,0,-1]+x/900,{x,0,1000}]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[FindFit, paclet:ref/FindFit])  ▪  (RefLink[FindMaximum, paclet:ref/FindMaximum])  ▪  (RefLink[FindMinimum, paclet:ref/FindMinimum])  ▪  (RefLink[FindRoot, paclet:ref/FindRoot])  ▪  (RefLink[NDSolve, paclet:ref/NDSolve])  ▪  (RefLink[NIntegrate, paclet:ref/NIntegrate])  ▪  (RefLink[NProduct, paclet:ref/NProduct])  ▪  (RefLink[NSum, paclet:ref/NSum])  ▪  (RefLink[Play, paclet:ref/Play])}})}})

({{DocumentationFooterIconsRelatedTutorial.png, ({{Tutorials}, {▪(RefLinkPlain[Options for Graphics, paclet:tutorial/Options])}, {▪(RefLinkPlain[Compiling Wolfram Language Expressions, paclet:tutorial/CompilingWolframLanguageExpressions])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Numerical Evaluation & Precision, paclet:guide/NumericalEvaluationAndPrecision])}, {▪(RefLinkPlain[Code Compilation, paclet:guide/CodeCompilation])}})}})