Number - (Arithmetical|Numerical|Mathematical) Operators

1 - About

Number operators

3 - Elementary

3.1 - Addition (+)

<math>addend + addend = sum </math>

x=1
x+=1
print x
# 2

3.2 - Subtraction (−)

<math>minuend − subtrahend = difference</math>

Subtraction (-)

3.3 - Division (÷ / )

Division (/)

dividend ÷ divisor = quotient

Python:

>>> 3/2
1.5

3.4 - Multiplication (×)

<math> multiplicand × multiplier = product </math>

4 - Integer

4.1 - Integer Division (Truncating)

Python:

>>> 3//2
1

4.2 - Modulo

count_to = 1 + 2

5 - Expo / Log

5.1 - Exponentiation

Exponentiation is a mathematical operation involving two numbers, the base (b) and the exponent (n) (or index or power).

<math>base^{exponent} = power</math>

<math>b^n = power</math>

Exponentiation (**).

5.2 - Logarithm

Mathematics - Logarithm Function (log)

<math> log_{base}(power) = exponent </math>

6 - Increment/ decrement

  • ++: increment
  • decrement
data/type/number/operator.txt · Last modified: 2017/09/17 17:36 by gerardnico