This is a REXX program that will allow you to make simple calculations.
All calculations are done in an infix manner. For example:
3 - 5
NOT:
- 3 5 OR 3 5 -
Enter in your arguments with a space in between. For example: "3 + 5", not "3+5".
You are able to add, subtract, multiply, divide and use exponents.
add: +
subtract: -
multiply: *
divide: /
exponent: E
The calculator will take higher precedence for exponents over multiplication and division, and higher precedence for multiplication and division over addition and subtraction.
Here are some examples you can use to guid your usage of the program.
2 E 2 returns 4
2 E 3 returns 8
3 * 2 returns 6
5 / 2 returns 2.5
3 + 2 returns 5
2 - 1 returns 1
2.4 + 3 returns 5.4
Make sure you use decimal format for fractions. Do not use 3/4, use .75.
5 + -1 returns 4