Appendix
A-2: Arithmetic Calculations
Example A-2.1
Evaluate 23+57 both exactly and as a floating-point (decimal) number.
Solution
Interactive Solution
In math mode, type in the sum. (Fractions are set with the slash (/). Use the right-arrow key to move from the denominator.)
Context Panel: Evaluate and Display Inline (Context Panel: See Table A-1.2.)
Context Panel: Approximate≻10
23+57 = 2921→at 10 digits1.380952381
Alternatively, include at least one floating-point number in the sum
Context Panel: Evaluate and Display Inline
2.03+57 = 1.380952381
Coded Solution
Assign the sum to a name such as S. (Assignment: use Colon + Equal (:=))
Press the Enter key to evaluate.
S≔23+57
S:=2921
Apply the evalf command to S.
evalfS
1.380952381
By assigning a value to a name such as S, the name can later be used in place of the value. The evalf command changes an exact number into a floating-point (decimal) value.
<< Previous Section of Appendix Section A-2 Next Example >>
© Maplesoft, a division of Waterloo Maple Inc., 2024. All rights reserved. This product is protected by copyright and distributed under licenses restricting its use, copying, distribution, and decompilation.
For more information on Maplesoft products and services, visit www.maplesoft.com
Download Help Document