<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://mscneuro.neuro.uni-bremen.de/index.php?action=history&amp;feed=atom&amp;title=Basic_Math_Operations</id>
	<title>Basic Math Operations - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://mscneuro.neuro.uni-bremen.de/index.php?action=history&amp;feed=atom&amp;title=Basic_Math_Operations"/>
	<link rel="alternate" type="text/html" href="https://mscneuro.neuro.uni-bremen.de/index.php?title=Basic_Math_Operations&amp;action=history"/>
	<updated>2026-06-03T07:03:40Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.5</generator>
	<entry>
		<id>https://mscneuro.neuro.uni-bremen.de/index.php?title=Basic_Math_Operations&amp;diff=334&amp;oldid=prev</id>
		<title>Davrot at 16:18, 17 October 2025</title>
		<link rel="alternate" type="text/html" href="https://mscneuro.neuro.uni-bremen.de/index.php?title=Basic_Math_Operations&amp;diff=334&amp;oldid=prev"/>
		<updated>2025-10-17T16:18:59Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 16:18, 17 October 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l332&quot;&gt;Line 332:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 332:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== [https://docs.python.org/3/library/operator.html Behind the curtain] ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== [https://docs.python.org/3/library/operator.html Behind the curtain] ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;{: .topic-optional} &lt;/del&gt;This is an optional topic!&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&#039;&#039;&#039;&lt;/ins&gt;This is an optional topic!&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&#039;&#039;&#039;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If you do a + b, in reality this is internally replaced by add(a, b).&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If you do a + b, in reality this is internally replaced by add(a, b).&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key wiki:diff:1.41:old-135:rev-334:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>Davrot</name></author>
	</entry>
	<entry>
		<id>https://mscneuro.neuro.uni-bremen.de/index.php?title=Basic_Math_Operations&amp;diff=135&amp;oldid=prev</id>
		<title>Davrot: Created page with &quot;Questions to [mailto:davrot@uni-bremen.de David Rotermund]  == Number is Python == In Python everything is a class. Numbers are classes as well.  === Integer === &lt;syntaxhighlight lang=&quot;python&quot;&gt;a_number = 0​ print(type(a_number))​ # -&gt; &lt;class &#039;int&#039;&gt;​&lt;/syntaxhighlight&gt;  == FLOATing point number == &lt;syntaxhighlight lang=&quot;python&quot;&gt;a_second_number = 3.33​ print(type(a_second_number))​ # -&gt; &lt;class &#039;float&#039;&gt;​&lt;/syntaxhighlight&gt;  == Conversion (i.e. casts) between types...&quot;</title>
		<link rel="alternate" type="text/html" href="https://mscneuro.neuro.uni-bremen.de/index.php?title=Basic_Math_Operations&amp;diff=135&amp;oldid=prev"/>
		<updated>2025-10-15T10:34:40Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;Questions to [mailto:davrot@uni-bremen.de David Rotermund]  == Number is Python == In Python everything is a class. Numbers are classes as well.  === Integer === &amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;a_number = 0​ print(type(a_number))​ # -&amp;gt; &amp;lt;class &amp;#039;int&amp;#039;&amp;gt;​&amp;lt;/syntaxhighlight&amp;gt;  == FLOATing point number == &amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;a_second_number = 3.33​ print(type(a_second_number))​ # -&amp;gt; &amp;lt;class &amp;#039;float&amp;#039;&amp;gt;​&amp;lt;/syntaxhighlight&amp;gt;  == Conversion (i.e. casts) between types...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Questions to [mailto:davrot@uni-bremen.de David Rotermund]&lt;br /&gt;
&lt;br /&gt;
== Number is Python ==&lt;br /&gt;
In Python everything is a class. Numbers are classes as well.&lt;br /&gt;
&lt;br /&gt;
=== Integer ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;a_number = 0​&lt;br /&gt;
print(type(a_number))​ # -&amp;gt; &amp;lt;class &amp;#039;int&amp;#039;&amp;gt;​&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== FLOATing point number ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;a_second_number = 3.33​&lt;br /&gt;
print(type(a_second_number))​ # -&amp;gt; &amp;lt;class &amp;#039;float&amp;#039;&amp;gt;​&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Conversion (i.e. casts) between types ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;a_second_number = 3.33​&lt;br /&gt;
a_second_number = int(a_second_number)​&lt;br /&gt;
print(type(a_second_number))​ # -&amp;gt; &amp;lt;class &amp;#039;int&amp;#039;&amp;gt;​&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Examples&lt;br /&gt;
|-&lt;br /&gt;
|[https://docs.python.org/3/library/functions.html#float float(x=0.0)]&lt;br /&gt;
|-&lt;br /&gt;
|[https://docs.python.org/3/library/functions.html#bin bin(x)]&lt;br /&gt;
|-&lt;br /&gt;
|[https://docs.python.org/3/library/functions.html#bool bool(x=False)]&lt;br /&gt;
|-&lt;br /&gt;
|[https://docs.python.org/3/library/functions.html#func-bytes bytes(source=b’’)]&lt;br /&gt;
|-&lt;br /&gt;
|[https://docs.python.org/3/library/functions.html#complex complex(real=0, imag=0)]&lt;br /&gt;
|-&lt;br /&gt;
|[https://docs.python.org/3/library/functions.html#hex hex(x)]&lt;br /&gt;
|-&lt;br /&gt;
|[https://docs.python.org/3/library/functions.html#int int(x=0)]&lt;br /&gt;
|-&lt;br /&gt;
|[https://docs.python.org/3/library/functions.html#func-str str(object=’’)]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== [https://docs.python.org/3/library/stdtypes.html#numeric-types-int-float-complex​ Basic math operations​] ==&lt;br /&gt;
Order of operations​: 1. Parentheses 2. Exponents 3. Multiplication/Division 4. Addition/Subtraction&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Operator&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|x + y&lt;br /&gt;
|sum of x and y&lt;br /&gt;
|-&lt;br /&gt;
|x - y&lt;br /&gt;
|difference of x and y&lt;br /&gt;
|-&lt;br /&gt;
|x * y&lt;br /&gt;
|product of x and y&lt;br /&gt;
|-&lt;br /&gt;
|x / y&lt;br /&gt;
|quotient of x and y&lt;br /&gt;
|-&lt;br /&gt;
|x // y&lt;br /&gt;
|floored quotient of x and y&lt;br /&gt;
|-&lt;br /&gt;
|x % y&lt;br /&gt;
|remainder of x / y&lt;br /&gt;
|-&lt;br /&gt;
| -x&lt;br /&gt;
|x negated&lt;br /&gt;
|-&lt;br /&gt;
| +x&lt;br /&gt;
|x unchanged&lt;br /&gt;
|}&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Operator&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|abs(x)&lt;br /&gt;
|absolute value or magnitude of x&lt;br /&gt;
|-&lt;br /&gt;
|int(x)&lt;br /&gt;
|x converted to integer&lt;br /&gt;
|-&lt;br /&gt;
|float(x)&lt;br /&gt;
|x converted to floating point&lt;br /&gt;
|-&lt;br /&gt;
|complex(re, im)&lt;br /&gt;
|a complex number with real part re, imaginary part im. im defaults to zero.&lt;br /&gt;
|-&lt;br /&gt;
|c.conjugate()&lt;br /&gt;
|conjugate of the complex number c&lt;br /&gt;
|-&lt;br /&gt;
|divmod(x, y)&lt;br /&gt;
|the pair (x // y, x % y)&lt;br /&gt;
|-&lt;br /&gt;
|pow(x, y)&lt;br /&gt;
|x to the power y&lt;br /&gt;
|-&lt;br /&gt;
|x ** y&lt;br /&gt;
|x to the power y&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== “True division” ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;print(5 / 2)​ # -&amp;gt; 2.5&lt;br /&gt;
print(6 / 2)​ # -&amp;gt; 3.0&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== “Floor division” ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;print(5 // 2)​ # -&amp;gt; 2&lt;br /&gt;
print(6 // 2)​ # -&amp;gt; 3&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Inplace Operation ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Inplace Operation&lt;br /&gt;
!Short for&lt;br /&gt;
|-&lt;br /&gt;
|a += b&lt;br /&gt;
|a = a + b&lt;br /&gt;
|-&lt;br /&gt;
|a &amp;amp;#x26;= b&lt;br /&gt;
|a = a &amp;amp;#x26; b&lt;br /&gt;
|-&lt;br /&gt;
|a //= b&lt;br /&gt;
|a = a // b&lt;br /&gt;
|-&lt;br /&gt;
|a &amp;amp;#x3C;&amp;amp;#x3C;= b&lt;br /&gt;
|a = a &amp;amp;#x3C;&amp;amp;#x3C; b&lt;br /&gt;
|-&lt;br /&gt;
|a %= b&lt;br /&gt;
|a = a % b&lt;br /&gt;
|-&lt;br /&gt;
|a *= b&lt;br /&gt;
|a = a * b&lt;br /&gt;
|-&lt;br /&gt;
|a @= b&lt;br /&gt;
|a = a @ b&lt;br /&gt;
|-&lt;br /&gt;
|= b&lt;br /&gt;
|b&lt;br /&gt;
|-&lt;br /&gt;
|a **= b&lt;br /&gt;
|a = a ** b&lt;br /&gt;
|-&lt;br /&gt;
|a &amp;amp;#x3E;&amp;amp;#x3E;= b&lt;br /&gt;
|a = a &amp;amp;#x3E;&amp;amp;#x3E; b&lt;br /&gt;
|-&lt;br /&gt;
|a -= b&lt;br /&gt;
|a = a - b&lt;br /&gt;
|-&lt;br /&gt;
|a /= b&lt;br /&gt;
|a = a / b&lt;br /&gt;
|-&lt;br /&gt;
|a ^= b&lt;br /&gt;
|a = a ^ b&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== [https://docs.python.org/3/library/stdtypes.html#boolean-operations-and-or-not Boolean Operations — and, or, not​] ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Operation&lt;br /&gt;
!Result&lt;br /&gt;
|-&lt;br /&gt;
|x or y&lt;br /&gt;
|if x is false, then y, else x&lt;br /&gt;
|-&lt;br /&gt;
|x and y&lt;br /&gt;
|if x is false, then x, else y&lt;br /&gt;
|-&lt;br /&gt;
|not x&lt;br /&gt;
|if x is false, then True, else False&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== [https://docs.python.org/3/library/stdtypes.html#boolean-operations-and-or-not Comparisons] ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Operation&lt;br /&gt;
!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|&amp;amp;#x3C;&lt;br /&gt;
|strictly less than&lt;br /&gt;
|-&lt;br /&gt;
|&amp;amp;#x3C;=&lt;br /&gt;
|less than or equal&lt;br /&gt;
|-&lt;br /&gt;
|&amp;amp;#x3E;&lt;br /&gt;
|strictly greater than&lt;br /&gt;
|-&lt;br /&gt;
|&amp;amp;#x3E;=&lt;br /&gt;
|greater than or equal&lt;br /&gt;
|-&lt;br /&gt;
|==&lt;br /&gt;
|equal&lt;br /&gt;
|-&lt;br /&gt;
|!=&lt;br /&gt;
|not equal&lt;br /&gt;
|-&lt;br /&gt;
|is&lt;br /&gt;
|object identity&lt;br /&gt;
|-&lt;br /&gt;
|is not&lt;br /&gt;
|negated object identity&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== [https://docs.python.org/3/library/stdtypes.html?highlight=elif#bitwise-operations-on-integer-types​ Bitwise Operations on Integer Types​] ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Operation&lt;br /&gt;
!Result&lt;br /&gt;
|-&lt;br /&gt;
|y&lt;br /&gt;
|bitwise or of x and y&lt;br /&gt;
|-&lt;br /&gt;
|x ^ y&lt;br /&gt;
|bitwise exclusive or of x and y&lt;br /&gt;
|-&lt;br /&gt;
|x &amp;amp;#x26; y&lt;br /&gt;
|bitwise and of x and y&lt;br /&gt;
|-&lt;br /&gt;
|x &amp;amp;#x3C;&amp;amp;#x3C; n&lt;br /&gt;
|x shifted left by n bits&lt;br /&gt;
|-&lt;br /&gt;
|x &amp;amp;#x3E;&amp;amp;#x3E; n&lt;br /&gt;
|x shifted right by n bits&lt;br /&gt;
|-&lt;br /&gt;
|~x&lt;br /&gt;
|the bits of x inverted&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== [https://docs.python.org/3/library/math.html​ More math operations​ (math lib)] ==&lt;br /&gt;
You need to include the math lib for that! (Only once per .py file and in the beginning of the file)&lt;br /&gt;
&lt;br /&gt;
However, don’t get used to it. As a data scientist you will not use it. You will use Numpy.&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;import math&lt;br /&gt;
print(math.cos(math.pi))​&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
![https://docs.python.org/3/library/math.html#number-theoretic-and-representation-functions Number-theoretic and representation functions]&lt;br /&gt;
|-&lt;br /&gt;
|math.ceil(x)&lt;br /&gt;
|-&lt;br /&gt;
|math.comb(n, k)&lt;br /&gt;
|-&lt;br /&gt;
|math.fabs(x)&lt;br /&gt;
|-&lt;br /&gt;
|math.factorial(n)&lt;br /&gt;
|-&lt;br /&gt;
|math.floor(x)&lt;br /&gt;
|-&lt;br /&gt;
|math.fmod(x, y)&lt;br /&gt;
|-&lt;br /&gt;
|math.fsum(iterable)&lt;br /&gt;
|-&lt;br /&gt;
|math.isclose(a, b, *, rel_tol=1e-09, abs_tol=0.0)&lt;br /&gt;
|-&lt;br /&gt;
|math.isfinite(x)&lt;br /&gt;
|-&lt;br /&gt;
|math.isinf(x)&lt;br /&gt;
|-&lt;br /&gt;
|math.isnan(x)&lt;br /&gt;
|-&lt;br /&gt;
|math.perm(n, k=None)&lt;br /&gt;
|-&lt;br /&gt;
|math.prod(iterable, *, start=1)&lt;br /&gt;
|-&lt;br /&gt;
|math.trunc(x)&lt;br /&gt;
|}&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
![https://docs.python.org/3/library/math.html#constants Constants]&lt;br /&gt;
|-&lt;br /&gt;
|math.pi&lt;br /&gt;
|-&lt;br /&gt;
|math.e&lt;br /&gt;
|-&lt;br /&gt;
|math.inf&lt;br /&gt;
|-&lt;br /&gt;
|math.nan&lt;br /&gt;
|}&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
![https://docs.python.org/3/library/math.html#power-and-logarithmic-functions Power and logarithmic functions]&lt;br /&gt;
|-&lt;br /&gt;
|math.cbrt(x)&lt;br /&gt;
|-&lt;br /&gt;
|math.exp(x)&lt;br /&gt;
|-&lt;br /&gt;
|math.exp2(x)&lt;br /&gt;
|-&lt;br /&gt;
|math.expm1(x)&lt;br /&gt;
|-&lt;br /&gt;
|math.log(x[,base])&lt;br /&gt;
|-&lt;br /&gt;
|math.log1p(x)&lt;br /&gt;
|-&lt;br /&gt;
|math.log2(x)&lt;br /&gt;
|-&lt;br /&gt;
|math.log10(x)&lt;br /&gt;
|-&lt;br /&gt;
|math.pow(x, y)&lt;br /&gt;
|-&lt;br /&gt;
|math.sqrt(x)&lt;br /&gt;
|}&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
![https://docs.python.org/3/library/math.html#trigonometric-functions Trigonometric functions]&lt;br /&gt;
|-&lt;br /&gt;
|math.acos(x)&lt;br /&gt;
|-&lt;br /&gt;
|math.asin(x)&lt;br /&gt;
|-&lt;br /&gt;
|math.atan(x)&lt;br /&gt;
|-&lt;br /&gt;
|math.atan2(y, x)&lt;br /&gt;
|-&lt;br /&gt;
|math.cos(x)&lt;br /&gt;
|-&lt;br /&gt;
|math.sin(x)&lt;br /&gt;
|-&lt;br /&gt;
|math.tan(x)&lt;br /&gt;
|-&lt;br /&gt;
|math.dist(p, q)&lt;br /&gt;
|}&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
![https://docs.python.org/3/library/math.html#angular-conversion Angular conversion]&lt;br /&gt;
|-&lt;br /&gt;
|math.degrees(x)&lt;br /&gt;
|-&lt;br /&gt;
|math.radians(x)&lt;br /&gt;
|}&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
![https://docs.python.org/3/library/math.html#hyperbolic-functions Hyperbolic functions]&lt;br /&gt;
|-&lt;br /&gt;
|math.acosh(x)&lt;br /&gt;
|-&lt;br /&gt;
|math.asinh(x)&lt;br /&gt;
|-&lt;br /&gt;
|math.atanh(x)&lt;br /&gt;
|-&lt;br /&gt;
|math.cosh(x)&lt;br /&gt;
|-&lt;br /&gt;
|math.sinh(x)&lt;br /&gt;
|-&lt;br /&gt;
|math.tanh(x)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== [https://docs.python.org/3/library/operator.html Behind the curtain] ==&lt;br /&gt;
{: .topic-optional} This is an optional topic!&lt;br /&gt;
&lt;br /&gt;
If you do a + b, in reality this is internally replaced by add(a, b).&lt;br /&gt;
&lt;br /&gt;
These are the [https://docs.python.org/3/library/operator.html#mapping-operators-to-functions “Mapping Operators to Functions”]:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Operation&lt;br /&gt;
!Syntax&lt;br /&gt;
!Function&lt;br /&gt;
|-&lt;br /&gt;
|Addition&lt;br /&gt;
|a + b&lt;br /&gt;
|add(a, b)&lt;br /&gt;
|-&lt;br /&gt;
|Concatenation&lt;br /&gt;
|seq1 + seq2&lt;br /&gt;
|concat(seq1, seq2)&lt;br /&gt;
|-&lt;br /&gt;
|Containment Test&lt;br /&gt;
|obj in seq&lt;br /&gt;
|contains(seq, obj)&lt;br /&gt;
|-&lt;br /&gt;
|Division&lt;br /&gt;
|a / b&lt;br /&gt;
|truediv(a, b)&lt;br /&gt;
|-&lt;br /&gt;
|Division&lt;br /&gt;
|a // b&lt;br /&gt;
|floordiv(a, b)&lt;br /&gt;
|-&lt;br /&gt;
|Bitwise And&lt;br /&gt;
|a &amp;amp;#x26; b&lt;br /&gt;
|and_(a, b)&lt;br /&gt;
|-&lt;br /&gt;
|Bitwise Exclusive Or&lt;br /&gt;
|a ^ b&lt;br /&gt;
|xor(a, b)&lt;br /&gt;
|-&lt;br /&gt;
|Bitwise Inversion&lt;br /&gt;
|~ a&lt;br /&gt;
|invert(a)&lt;br /&gt;
|-&lt;br /&gt;
|Bitwise Or&lt;br /&gt;
|b&lt;br /&gt;
|or_(a, b)&lt;br /&gt;
|-&lt;br /&gt;
|Exponentiation&lt;br /&gt;
|a ** b&lt;br /&gt;
|pow(a, b)&lt;br /&gt;
|-&lt;br /&gt;
|Identity&lt;br /&gt;
|a is b&lt;br /&gt;
|is_(a, b)&lt;br /&gt;
|-&lt;br /&gt;
|Identity&lt;br /&gt;
|a is not b&lt;br /&gt;
|is_not(a, b)&lt;br /&gt;
|-&lt;br /&gt;
|Indexed Assignment&lt;br /&gt;
|obj[k] = v&lt;br /&gt;
|setitem(obj, k, v)&lt;br /&gt;
|-&lt;br /&gt;
|Indexed Deletion&lt;br /&gt;
|del obj[k]&lt;br /&gt;
|delitem(obj, k)&lt;br /&gt;
|-&lt;br /&gt;
|Indexing&lt;br /&gt;
|obj[k]&lt;br /&gt;
|getitem(obj, k)&lt;br /&gt;
|-&lt;br /&gt;
|Left Shift&lt;br /&gt;
|a &amp;amp;#x3C;&amp;amp;#x3C; b&lt;br /&gt;
|lshift(a, b)&lt;br /&gt;
|-&lt;br /&gt;
|Modulo&lt;br /&gt;
|a % b&lt;br /&gt;
|mod(a, b)&lt;br /&gt;
|-&lt;br /&gt;
|Multiplication&lt;br /&gt;
|a * b&lt;br /&gt;
|mul(a, b)&lt;br /&gt;
|-&lt;br /&gt;
|Matrix Multiplication&lt;br /&gt;
|a @ b&lt;br /&gt;
|matmul(a, b)&lt;br /&gt;
|-&lt;br /&gt;
|Negation (Arithmetic)&lt;br /&gt;
| - a&lt;br /&gt;
|neg(a)&lt;br /&gt;
|-&lt;br /&gt;
|Negation (Logical)&lt;br /&gt;
|not a&lt;br /&gt;
|not_(a)&lt;br /&gt;
|-&lt;br /&gt;
|Positive&lt;br /&gt;
| + a&lt;br /&gt;
|pos(a)&lt;br /&gt;
|-&lt;br /&gt;
|Right Shift&lt;br /&gt;
|a &amp;amp;#x3E;&amp;amp;#x3E; b&lt;br /&gt;
|rshift(a, b)&lt;br /&gt;
|-&lt;br /&gt;
|Slice Assignment&lt;br /&gt;
|seq[i:j] = values&lt;br /&gt;
|setitem(seq, slice(i, j), values)&lt;br /&gt;
|-&lt;br /&gt;
|Slice Deletion&lt;br /&gt;
|del seq[i:j]&lt;br /&gt;
|delitem(seq, slice(i, j))&lt;br /&gt;
|-&lt;br /&gt;
|Slicing&lt;br /&gt;
|seq[i:j]&lt;br /&gt;
|getitem(seq, slice(i, j))&lt;br /&gt;
|-&lt;br /&gt;
|String Formatting&lt;br /&gt;
|s % obj&lt;br /&gt;
|mod(s, obj)&lt;br /&gt;
|-&lt;br /&gt;
|Subtraction&lt;br /&gt;
|a - b&lt;br /&gt;
|sub(a, b)&lt;br /&gt;
|-&lt;br /&gt;
|Truth Test&lt;br /&gt;
|obj&lt;br /&gt;
|truth(obj)&lt;br /&gt;
|-&lt;br /&gt;
|Ordering&lt;br /&gt;
|a &amp;amp;#x3C; b&lt;br /&gt;
|lt(a, b)&lt;br /&gt;
|-&lt;br /&gt;
|Ordering&lt;br /&gt;
|a &amp;amp;#x3C;= b&lt;br /&gt;
|le(a, b)&lt;br /&gt;
|-&lt;br /&gt;
|Equality&lt;br /&gt;
|a == b&lt;br /&gt;
|eq(a, b)&lt;br /&gt;
|-&lt;br /&gt;
|Difference&lt;br /&gt;
|a != b&lt;br /&gt;
|ne(a, b)&lt;br /&gt;
|-&lt;br /&gt;
|Ordering&lt;br /&gt;
|a &amp;amp;#x3E;= b&lt;br /&gt;
|ge(a, b)&lt;br /&gt;
|-&lt;br /&gt;
|Ordering&lt;br /&gt;
|a &amp;amp;#x3E; b&lt;br /&gt;
|gt(a, b)&lt;br /&gt;
|}&lt;br /&gt;
[https://docs.python.org/3/library/operator.html#in-place-operators In-place Operators]&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|a += b&lt;br /&gt;
|a = iadd(a, b)&lt;br /&gt;
|-&lt;br /&gt;
|a &amp;amp;#x26;= b&lt;br /&gt;
|a = iand(a, b)&lt;br /&gt;
|-&lt;br /&gt;
|a += b for a and b &amp;#039;&amp;#039;&amp;#039;sequences&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|a = iconcat(a, b)&lt;br /&gt;
|-&lt;br /&gt;
|a //= b&lt;br /&gt;
|a = ifloordiv(a, b)&lt;br /&gt;
|-&lt;br /&gt;
|a &amp;amp;#x3C;&amp;amp;#x3C;= b&lt;br /&gt;
|a = ilshift(a, b)&lt;br /&gt;
|-&lt;br /&gt;
|a %= b&lt;br /&gt;
|a = imod(a, b)&lt;br /&gt;
|-&lt;br /&gt;
|a *= b&lt;br /&gt;
|a = imul(a, b)&lt;br /&gt;
|-&lt;br /&gt;
|a @= b&lt;br /&gt;
|a = imatmul(a, b)&lt;br /&gt;
|-&lt;br /&gt;
|= b&lt;br /&gt;
|a = ior(a, b)&lt;br /&gt;
|-&lt;br /&gt;
|a **= b&lt;br /&gt;
|a = ipow(a, b)&lt;br /&gt;
|-&lt;br /&gt;
|a &amp;amp;#x3E;&amp;amp;#x3E;= b&lt;br /&gt;
|a = irshift(a, b)&lt;br /&gt;
|-&lt;br /&gt;
|a -= b&lt;br /&gt;
|a = isub(a, b)&lt;br /&gt;
|-&lt;br /&gt;
|a /= b&lt;br /&gt;
|a = itruediv(a, b)&lt;br /&gt;
|-&lt;br /&gt;
|a ^= b&lt;br /&gt;
|a = ixor(a, b)&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Davrot</name></author>
	</entry>
</feed>