5.9.1 Eval a real at a given precision : evalf and Digits, DIGITS
A real number is an exact number and its numeric evaluation at a given
precision is a floating number represented in base 2.
The precision of a floating number is the number of bits of its
mantissa, which is at least 53 (hardware float numbers, also known as double). Floating numbers are displayed in base 10 with a number
of digits controlled by the user either by assigning the Digits
variable or by modifying the Cas configuration.
By default Digits is equal to 12.
The number of digits displayed controls the number of bits of the
mantissa, if Digits is less than 15, 53 bits are used, if Digits is
strictly greater than 15, the number of bits is a roundoff of
Digits times the log of 10 in base 2.
- An expression is coerced into a floating number with the evalf
command. evalf may have an optional second argument which will
be used to evaluate with a given precision.
- Note that if an expression contains a floating number, evaluation will try
to convert other arguments to floating point numbers in order
to coerce the whole expression to a single floating number.
With evalf, input :
Input for a result with 30 digits :
Input for the numeric value of eπ√163:
Note that Digits is now set to 30. If you don’t want to change
the value of Digits you may input