${}$
Appendix
A-2: Arithmetic Calculations
Example A-2.1
Evaluate $\frac{2}{3}\+\frac{5}{7}$ both exactly and as a floating-point (decimal) number.
Solution
Maple Solution - Interactive
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 (digits)
$\frac{2}{3}\+\frac{5}{7}$ = $\frac{{29}}{{21}}$$\stackrel{\text{at 10 digits}}{\to}$${1.380952381}$${}$
Alternatively, include at least one floating-point number in the sum
Context Panel: Evaluate and Display Inline
$\frac{2.0}{3}\+\frac{5}{7}$ = ${1.380952381}$${}$
Maple Solution - Coded
Assign the sum to a name such as $S$. (Assignment: use Colon + Equal (:=))
Press the Enter key to evaluate.
$S\u2254\frac{2}{3}\+\frac{5}{7}$
${S}{:=}\frac{{29}}{{21}}$
Apply the evalf command to $S$.
$\mathrm{evalf}\left(S\right)$
${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., 2023. 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
What kind of issue would you like to report? (Optional)