evalf
evaluate using floating-point arithmetic
Calling Sequence
Parameters
Basic Information
Examples
Details
evalf(expression)
expression
-
expression to be evaluated
Description
The evalf command numerically evaluates expressions (or subexpressions) involving constants (for example, π, ⅇ, and γ ) and mathematical functions (for example, exp, ln, sin, arctan, cosh, GAMMA, and erf).
For a complete list of constants, see Initially Known Names. For a complete list of mathematical functions, see Initially Known Mathematical Functions.
Output
The evalf command returns a floating-point or complex floating-point number or expression.
π
evalf⁡π
3.141592654
evalf⁡cos⁡1+sin⁡1⁢I
0.5403023059+0.8414709848⁢I
evalf⁡34⁢x2+13⁢x−sqrt⁡2
0.7500000000⁢x2+0.3333333333⁢x−1.414213562
The evalf command can be used to evaluate more complex mathematical functions.
f≔int⁡exp⁡x3,x=0..1
f≔∫01ⅇx3ⅆx
evalf⁡f
1.341904418
g≔Sum⁡1sqrt⁡x,x=1..1000
g≔∑x=11000⁡1x
evalf⁡g
61.80100877
The number of significant digits can be restricted with the evalf command.
evalf3⁡π
3.14
evalf15⁡π
3.14159265358979
For detailed information including:
Complete description of all parameters
Controlling numeric precision of computations
Special evaluation for user-defined constants and functions
see the evalf/details help page.
See Also
Digits
float
fsolve
Initially Known Mathematical Functions
Initially Known Names
Numeric Computation in Maple
Rounding
Download Help Document