This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)

RuntimeOptions

RuntimeOptions
is an option for Compile that specifies runtime settings for the compiled function it creates.
"Quality"optimize for quality of final results
"Speed"optimize for speed of getting results
"CatchMachineOverflow"Falsewhether real overflow should be caught as it happens
"CatchMachineUnderflow"Falsewhether real underflow should be caught as it happens
"CatchMachineIntegerOverflow"Truewhether integer overflow should be caught
"CompareWithTolerance"Truewhether comparisons should work similarly to SameQ
"EvaluateSymbolically"Truewhether to evaluate with symbolic arguments
"RuntimeErrorHandler"Evaluatea function to apply if there is a fatal runtime error executing the function
"WarningMessages"Truewhether warning messages should be emitted
"CatchMachineOverflow"False
"CatchMachineUnderflow"False
"CatchMachineIntegerOverflow"False
"CompareWithTolerance"False
"EvaluateSymbolically"True
"RuntimeErrorHandler"Evaluate
"WarningMessages"True
"CatchMachineOverflow"True
"CatchMachineUnderflow"True
"CatchMachineIntegerOverflow"True
"CompareWithTolerance"True
"EvaluateSymbolically"True
"RuntimeErrorHandler"Evaluate
"WarningMessages"True
Typically, integer arithmetic overflow is caught and the computation switches to use bignums:
Turning off runtime checks leads to maximum speed but the result can be incorrect if the numbers overflow:
Typically, integer arithmetic overflow is caught and the computation switches to use bignums:
In[1]:=
Click for copyable input
Out[1]=
Turning off runtime checks leads to maximum speed but the result can be incorrect if the numbers overflow:
In[2]:=
Click for copyable input
Out[2]=
Typically, machine underflow is not caught and the computation generates zero:
Turning on underflow checking leads to a runtime error:
Typically, machine integer overflow is caught and generates a runtime error:
Turning off machine integer overflow checking leads to faster results, which may be incorrect in some cases:
The setting is used when there is a runtime error:
With no error, the compiled function works as normal:
If there is a runtime error, the function behaves differently:
The default is to evaluate the function symbolically with symbolic arguments:
With False, the function returns unevaluated:
This evaluates if the symbolic argument is replaced with a number:
Sometimes symbolic evaluation does not give what you intend:
Preventing symbolic evaluation keeps the original intent:
Symbolic evaluation may be slow for expressions that expand out:
New in 8