Doing Arithemetic

If an arithmetic expression is entered at command prompt the interpreter will evaluate it and display the answer.
>> (75.00 + 89.50 + 97.50) / 3 * 0.7 + 92.00 * 0.3
    88.73333333
The expression may contain numbers and operators +, -, *, and / that represent addition, subtraction, multiplication, and division, and parentheses can be used for grouping.
+ addition
- subtraction
* multiplication
/ division
^ a^b is equal to $ a^b$
() grouping

Finding the square root of $ 6^2 + 8^2$

>> (6^2 + 8^2)^(1/2)
    10
Numbers can also be enter using exponential format. For example, -1.1e-3 is the same as -0.0011, and 1e+6 or 1e6 is another way of writing 1000000, a million.



oz 2009-12-22