|
Arithmetic Notation | Contents |
On a previous page, you learned the Shwa numerals and signs. On this page, we'll discuss the symbols needed to express basic arithmetic.
In English, we use + to separate numbers being added together, but when we enclose a total in a larger expression, we have to surround it with parentheses or brackets, as in [4+3]. In Shwa, we simply draw a line over a sequence of expressions - numbers or larger formulas - to indicate that they should be added together. The only separator needed is a space.
The second example shows little decorations I'll call valances at each end of the overline. We sometimes use them to make it clearer where the overline begins and ends. Spaces within valances should always display as dots - remember, the dot is the visible form of the space in Shwa.
The two-dimensional (2D) format above is how the formula should be written or displayed, but when an expression is read aloud or entered on a keyboard, you need its one-dimensional (1D) format:
In the 1D format, we just enter the correct valances, and the formatter should complete the overline.
Subtraction
To indicate subtraction, we insert a vertical line before the number(s) being subtracted. In the 2D format, the vertical line hangs from the overline. You can subtract individual numbers or expressions no matter where they are in the sequence, even first.
Multiplication works just like addition, except the line is underneath.
Finally, division uses the same vertical line, but sitting on the underline. As with subtraction, you can divide individual numbers anywhere in the sequence.
Division can be used to indicate the reciprocal of any expression (the fraction sign can only be used with integers).
These four operations can be combined without fear of ambiguity (and without precedence rules).
We read the English expression 3² as three squared or three to the second power: 3 is the base, 2 is the power or exponent, and the operation is called exponentiation. When using keyboards, the same expression is often written 3^2, since most keyboards can't write superscripts.
In Shwa, we link the base and the power with a diagonal step that goes over the base and under the power, which can occur in either order.
If 9 is 3 squared, then 3 is the square root of 9, the number which, when squared, reverts to the original. Just as we use a vertical line to mark subtraction and division, the reverse operations of addition and multiplication, we use a vertical line with exponentiation to mark roots. The square root is mathematically equivalent to the one-half power.
Roots are the reverse operation of powers, but logarithms are the inverse operation of powers, in the sense that if bª = c, then a = logb(c). Shwa uses the same notation to indicate logs as it does for powers and roots, but this time with a vertical line in front of the base.
All of the above can be combined into formulas. Here's a complicated example - the quadratic formula in 2D format. I've used the letters p t k to represent the coefficients of the quadratic px² + tx + k = 0, whose roots are the solutions to the formula.
-t + √(t² - 4pk)
2p
(It's not correct to use ± before the root, since both square roots
are added - one of them just happens to be negative.)
Names
As the above formula shows, Shwa also uses letters within formulas to spell the names of constants, variables and functions.
By convention, one-letter names are used for temporary names like the variables in the quadratic formula above, while customary names get longer meaningful abbreviations. For example:



























Unlike some computer languages, Shwa doesn't include digits in names. That's because any letters in front of numbers, with no spaces, are units - units always go ahead of numbers in Shwa. For example, kg1°81, with no spaces, is how we write 81 kilograms.
We use low tone marks and the Long mark within compound unit names:
For example, man-hours would use the Level mark, square meters would use the Rising mark, and kilometers per hour would use the Long mark.
Note the use of magnitude notation: these are all real numbers, not integers.
Functions
Functions not only have names; they also have arguments, parameters being passed to the function. For example, the famous trigonometric functions sin(p) cos(p) tan(p) all require an angle p. In Shwa, we use a box notation for the arguments of a function, with a space (dot) between arguments. If the result of one function is an argument to another, the boxes may nest, as shown below.
The next three sections deal with natural arithmetic, in which there are no negative or real numbers. The operators all use a doubled vertical line.
A doubled subtraction sign is used as a unary prefix to indicate a positive number, or the Absolute Value of a number (the number without the sign).
The difference sign is used between numbers to indicate a special form of subtraction whose result is always positive: difference. For example, we say that New York is the same distance from San Francisco as San Francisco is from New York, not its negative.
The two Modulo functions - quotient and modulus - are a variant of division. The main use of these functions is to perform conversions of numbers from one form into another: into integers, real numbers, or multiples of a modulus. In the expressions a quot b or a mod b, a is called the dividend and b is called the divisor. The result of quot is called the quotient, and the result of mod is called the modulus or remainder.
If the dividend and divisor are both natural numbers (positive integers, including zero), then the quotient and remainder are also both natural numbers, and the following three properties hold:
For example, consider 7÷4. Using normal (real) division, the result is 1.75, and if you multiply the divisor by the quotient, you get the dividend: 7 = 4 × 1.75. But using modular division, the quotient would be 1 with a remainder of 3, and 7 = 4 × 1 + 3.
When the dividend and divisor aren't both natural numbers, the results are more complicated, but the same three properties always hold. When the divisor is negative, so is the remainder. When the dividend or divisor is real, so is the remainder. When the divisor is 1, the remainder is the fractional part of the number: 0 ≤ r < 1. When the divisor is zero, so is the quotient but not the remainder (and the division is valid)!
The two signs are used more often than you might think, for dates and times, for example, or to separate numbers into
integer+fraction, or real+imaginary, or larger+smaller than an arbitrary size. For instance, if you want to know how
many 8-packs of hot dog buns you'll need for five 6-packs of hot dogs, it's (5×6) quot -8 (the divisor is
negative so the remainder is negative: leftover buns).
Equalities
Shwa offers double-wide symbols for seven equalities, written with a space on either side.
The equal sign is represented in Shwa by a big double-wide T, showing the two sides are balanced:
The unequal sign is the same T, but upside down:
These two signs combine to form the four inequalities:
There is also a sign for approximate equality, which is sometimes used as a general symbol for ambiguity.
There is a different sign for equivalence, which means "not identical, but equal in some quality". For example, this is the relationship between the two square roots of negative 1. It might be used outside of arithmetic to match corresponding items, e.g. English cat ↔ French chat.
Finally, there is a sign for identity, which means "the item on the left is being defined as identical to the expression on the right".
And here's the same thing in 1D form, as you would type it on a keyboard:
![]() ![]() ![]()
![]()
![]() ![]() ![]()
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
To recap, here are all the symbols in the Shwa script :
All these symbols are available on the Shwa keypad, in Formula mode.
To shift into Formula mode, use the Shift key followed by the Formula mode key:
| < Numerals | Contents | Reverse Numbers > |
| © 2002-2012 Shwa | shwa@shwa.org | 05may12 |