"Arithmetic does not talk about numbers, but works with numbers" (Witgenstein. Philosophical Investigations).
Repetitive Sum (Product)
Semantics and Syntax
The expression x+x+...+x (n summands), where n is a natural number, is a repeating sum and evaluates to n*x. In turn, n*x represents x+x+...+x (n summands).
When x is a real number, the operation is the product of x times n.
By definition, the expression x*n is evaluated as n*x, i.e., the numeric factor is prefixed: 〈( x*n = n*x )〉. For example, a*3 evaluates to 3*a.
The repetitive addition operation can be generalized to any real number r (expressible in finite form): r*x. For example,
3.7*a // rep. (a + a + a + a + 0.7*a)
If the real number is negative, we have property
〈( −r*x ≡ (−r)*x) ≡ −(r*x) )〉
Repetitive Product (Power)
Syntax and semantics
The expression x*x*...*x (n factors), where n is a positive integer, is a repeated product and evaluates to x^n. In turn, x^n represents x*x*...*x (n factors).
When x is a number, the operation is called "power of base x and exponent n".
In general, you have the expression ^⊣( x★n ), where the evaluation is performed from the left.
On the other hand, the expression
(x^(x^(x^(x^...)))) (n times x)
would be specified by the expression (^⊣( x★n ))∼, with the evaluation starting from the right. For example, for n = 4, you have x^(x^(x^x)).
Using the notation 〈( x(^^)n =: ^&⊣( x★n ) )〉, the two types of hyperpowers are:
〈( (x^y)('^)y ≡ y*(x('^)y) )〉
then logy(x^y) = y*logyx
〈( (y^z)('^)x ≡ z*(y('^)x) )〉
then logx(y^z) = z*logxy
Arithmetic operations depending on whether the numbers are integers or real numbers
The rule is:
If the operands are integers, the operation is performed in integer.
If any operand is real, the operation is performed in real.
By definition, a real number is one that contains a decimal point.
For example, in integer division n1÷n2, the result is an integer.
The remainder of the division is:
(n1 - (n1÷n2)*n2)
Real division: (r1÷r2). The result is a real number.
Conversion to integer: (n = r).
Conversion to real: (r = n.).
The integer variable n is converted to real by adding a decimal point to the right.
Examples:
(n = 13)
n÷2 // ev. 6
n.÷2 // ev. 6.5 (the operation is performed in real)
(13 - (13÷2)*2) // ev. 1 (remainder of division)
(n = 13.8) // conversion to integer
n // ev. 13
2(^')2 = 1 // square root of 2 (integer operation)
2.(^')2 = 1.4142 // square root of 2 (operation in real)
2(^')2 = 1 // base 2 logarithm of 2 (integer operation)
2(^')2. = 1. // logarithm in base 2 of 2 (operation in real)