Enable JavaScript to interact with content and submit forms on Wolfram websites. Learn how

Legacy Documentation

Mathematica 8 (2010)

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

Defining Numerical Values

If you make a definition such as , Mathematica will use the value you give for any function it encounters. In some cases, however, you may want to define a value that is to be used specifically when you ask for numerical values.
expr=value define a value to be used whenever possible
N[expr]=value define a value to be used for numerical approximation

Defining ordinary and numerical values.

This defines a numerical value for the function .
Defining the numerical value does not tell Mathematica anything about the ordinary value of .
Out[2]=
If you ask for a numerical approximation, however, Mathematica uses the numerical values you have defined.
Out[3]=
You can define numerical values for both functions and symbols. The numerical values are used by all numerical Mathematica functions, including NIntegrate , FindRoot , and so on.
N[expr]=value define a numerical value to be used when default numerical precision is requested
N[expr,{n,Infinity}]=value define a numerical value to be used when n-digit precision and any accuracy is requested

Defining numerical values that depend on numerical precision.

This defines a numerical value for the symbol , using terms in the product for -digit precision.
Here is the value of , computed to 30-digit precision using the value you specified.
Out[5]=
Mathematica treats numerical values essentially like upvalues. When you define a numerical value for f, Mathematica effectively enters your definition as an upvalue for f with respect to the numerical evaluation operation N .


ja zh

AltStyle によって変換されたページ (->オリジナル) /