Skip to content

Instantly share code, notes, and snippets.

@akhenakh
Last active October 28, 2025 12:54
Show Gist options
  • Select an option

  • Save akhenakh/175394d51ab04c4b6a714d713a4b14b6 to your computer and use it in GitHub Desktop.

Select an option

Save akhenakh/175394d51ab04c4b6a714d713a4b14b6 to your computer and use it in GitHub Desktop.
Math for devs source https://math4devs.com/ but into markdown, and for Go & Python

List of mathematical symbols with their JavaScript equivalent.

Of course. Here is the completed table with the added "Python" and "Go" columns.

Symbol Name Since Example JavaScript Python Go
Horizontal bar for division ~1300 $a/b$ a / b a / b a / b
+ Plus sign 1360 $a + b$ a + b a + b a + b
- Minus sign 1489 $a - b$ a - b a - b a - b
Radical symbol 1525 $√x$ Math.sqrt(x) import math math.sqrt(x) import "math" math.Sqrt(x)
(...) Parentheses 1544 $(a + b)$ (a + b) (a + b) (a + b)
= Equals 1557 $a = b$ // equality a == b // assignment a = b # equality a == b # assignment a = b // equality a == b // assignment a = b
. Decimal separator 1593 $1.75$ 1.75 1.75 1.75
× Multiplication sign 1618 $a × b$ a * b a * b a * b
± Plus–minus sign 1628 $a ± 2$ [a - 2, a + 2] (a - 2, a + 2) []float64{a - 2, a + 2}
ⁿ√ Radical symbol for nth root 1629 $√[n]a$ Math.pow(a, 1/n) a ** (1/n) import "math" math.Pow(a, 1/n)
< Strict inequality less-than 1631 $a &lt; b$ a < b a < b a < b
> Strict inequality greater-than 1631 $a &gt; b$ a > b a > b a > b
Superscript notation 1636 $a^b$ a ** b a ** b import "math" math.Pow(a, b)
x Use of the letter x for an independent variable or unknown value 1637 $x$ // declare let x = 0 // usage x // re-assign x = 2 # declare & assign x = 0 # usage x # re-assign x = 2 // declare var x int = 0 // short declare x := 0 // usage x // re-assign x = 2
% Percent sign 1650 $n%$ n / 100 n / 100 float64(n) / 100.0
Infinity sign 1655 $∞$ Infinity import math math.inf import "math" math.Inf(1)
÷ Division sign 1659 $a ÷ b$ a / b a / b a / b
Unstrict inequality less-than sign 1670 $a ≤ b$ a <= b a <= b a <= b
Unstrict inequality greater-than sign 1670 $a ≥ b$ a >= b a >= b a >= b
d Differential sign 1675 $m = dy/dx$ m = (y2 - y1) / (x2 - x1) m = (y2 - y1) / (x2 - x1) m = (y2 - y1) / (x2 - x1)
Integral sign 1675 $\int_{1}^{8} f(x) \cdot dx$ let dx = 1/8 // step size let sum = 0 for (let x=1; x<=8; x += dx) { sum += f(x) * dx } dx = 1/8 # step size total = 0 x = 1.0 while x <= 8: total += f(x) * dx x += dx dx := 1.0/8.0 // step size var sum float64 = 0 for x:=1.0; x<=8.0; x+=dx { sum += f(x) * dx }
: Colon for division 1684 $a : b$ a / b a / b a / b
· Middle dot for multiplication 1698 $a ⋅ b$ a * b a * b a * b
Division slash 1718 $a / b$ a / b a / b a / b
Inequality sign unknown $a ≠ b$ a != b a != b a != b
x' Prime symbol for derivative 1748 $x'$ // TODO # TODO // TODO
Σ Summation symbol 1755 $\sum_{i=0}^{10} i$ let sum = 0 for(let i=0; i<=10; i++) { sum += i } total = 0 for i in range(11): total += i sum := 0 for i:=0; i<=10; i++ { sum += i }
Proportionality sign 1768 $(y/x) \propto (b/a)$ y/x == b/a y/x == b/a y/x == b/a
Partial differential sign 1770 $\partial f / \partial x$ // TODO # TODO // TODO
Identity sign 1801 $a ≡ b$ a === b a == b a == b
[x] Integral part (aka floor) 1808 $[x]$ Math.floor(x) import math math.floor(x) import "math" math.Floor(x)
! Factorial 1808 $n!$ function factorial(n) { if (n == 0) return 1 return n * factorial(n - 1) } def factorial(n): if n == 0: return 1 return n * factorial(n-1) func factorial(n uint64) uint64 { if n == 0 { return 1 } return n * factorial(n-1) }
Π Product symbol 1812 $\prod_{x=2}^{4} (x+1)$ let product = 1 for (let x=2; x<=4; x++) { product *= (x + 1) } product = 1 for x in range(2, 5): product *= (x + 1) product := 1 for x:=2; x<=4; x++ { product *= (x + 1) }
Set subset of 1817 $a ⊂ b$ // TC39 Proposal a.isSubsetOf(b) a = {1, 2} b = {1, 2, 3} a.issubset(b) // No built-in set type. // Must be implemented manually.
Set superset of 1817 $a ⊃ b$ // TC39 Proposal a.isSupersetOf(b) a = {1, 2, 3} b = {1, 2} a.issuperset(b) // No built-in set type. // Must be implemented manually.
|...| Absolute value notation 1841 $∣x∣$ Math.abs(x) abs(x) import "math" math.Abs(x)
‖...‖ Matrix notation 1843 $‖x‖$ // TODO # TODO // TODO
Intersection 1888 $a ∩ b$ // TC39 Proposal a.intersection(b) a = {1, 2} b = {2, 3} a.intersection(b) // No built-in set type. // Must be implemented manually.
Union 1888 $a ∪ b$ // TC39 Proposal a.union(b) a = {1, 2} b = {2, 3} a.union(b) // No built-in set type. // Must be implemented manually.
Membership sign 1894 $a ∈ b$ let b = new Set(...) b.has(a) b = { ... } a in b // For a map-based set b := make(map[T]struct{}) _, ok := b[a]
{...} Curly brackets for set notation 1895 ${x, y, z}$ new Set([x, y, z]) {x, y, z} // Using a map s := map[any]struct{}{ x: {}, y: {}, z: {}, }
Existential quantifier (there exists) 1897 $(∃x) f(x)$ let array = [ ... ] array.some(x => f(x)) array = [ ... ] any(f(x) for x in array) func exists(arr []T) bool { for _, x := range arr { if f(x) { return true } } return false }
· Dot product 1902 $a \cdot b$ let sum = 0 for (let i=0; i<a.length; i++) { sum += a[i] * b[i] } s = 0 for i in range(len(a)): s += a[i] * b[i] var sum T = 0 for i := range a { sum += a[i] * b[i] }
× Cross product 1902 $a \times b$ let a = [x1, y1, z1] let b = [x2, y2, z2] [(a[1]*b[2])-(a[2]*b[1]), (a[2]*b[0])-(a[0]*b[2]), (a[0]*b[1])-(a[1]*b[0])] a = [x1, y1, z1] b = [x2, y2, z2] [(a[1]*b[2])-(a[2]*b[1]), (a[2]*b[0])-(a[0]*b[2]), (a[0]*b[1])-(a[1]*b[0])] a := []T{x1, y1, z1} b := []T{x2, y2, z2} []T{ a[1]*b[2] - a[2]*b[1], a[2]*b[0] - a[0]*b[2], a[0]*b[1] - a[1]*b[0], }
Logical disjunction (aka OR) 1906 $a \lor b$ a || b a or b a || b
(...) Matrix round bracket notation 1909 $\begin{pmatrix} a & b & c \ x & y & z \end{pmatrix}$ [[a, b, c], [x, y, z]] [[a, b, c], [x, y, z]] [][]T{{a, b, c}, {x, y, z}}
[...] Matrix square bracket notation 1909 $\begin{bmatrix} a & b & c \ x & y & z \end{bmatrix}$ [[a, b, c], [x, y, z]] [[a, b, c], [x, y, z]] [][]T{{a, b, c}, {x, y, z}}
Universal quantifier (for all) 1935 $(∀x) f(x)$ let array = [ ... ] array.every(x => f(x)) array = [ ... ] all(f(x) for x in array) func forall(arr []T) bool { for _, x := range arr { if !f(x) { return false } } return true }
Empty set sign 1939 $∅$ new Set() set() // Map simulating a set make(map[any]struct{})
⌊x⌋ Greatest integer ≤ x (aka floor) 1962 $⌊x⌋$ Math.floor(x) import math math.floor(x) import "math" math.Floor(x)
⌈x⌉ Smallest integer ≥ x (aka ceiling) 1962 $⌈x⌉$ Math.ceil(x) import math. math.ceil(x) import "math" math.Ceil(x)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment