-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinfinity.js
49 lines (37 loc) · 1.09 KB
/
infinity.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
console.log(1 / 0)
console.log(0 / 0)
console.log(-1 / 0)
console.log(1 / 0 * 0)
console.log(1 / 0 * 1)
console.log(1 / 0 * -1)
console.log(1 / 0 * 1 + 1 / 0 * 1)
console.log(1 / 0 * 1 - 1 / 0 * 1)
console.log(1 / 0 * 1 * (1 / 0 * 1))
console.log(1 / 0 * 1 / (1 / 0 * 1))
console.log(0 / Infinity)
console.log(0 * Infinity)
/*
console.log(1 / 0) // Infinity
console.log(0 / 0) // NaN
console.log(-1 / 0) // -Infinity
console.log(1 / 0 * 0) // NaN
// Infinity * 0 = NaN
console.log(1 / 0 * 1) // Infinity
// Infinity * 1 = Infinity
console.log(1 / 0 * -1) // -Infinity
// Infinity * -1 = -Infinity
console.log(1 / 0 * 1 + 1 / 0 * 1) // Infinity
// Infinity * 1 + Infinity * 1
// Infinity + Infinity = Infinity
console.log(1 / 0 * 1 - 1 / 0 * 1) // NaN
// Infinity * 1 - Infinity *1
// Infinity - Infinity = NaN
console.log(1 / 0 * 1 * (1 / 0 * 1)) // Infinity
// Infinity * 1 * (Infinity * 1)
// Infinity * Infinity = Infinity
console.log(1 / 0 * 1 / (1 / 0 * 1)) // NaN
// Infinity * 1 / (Infinity * 1)
// Infinity / Infinity = NaM
console.log(0 / Infinity) // 0
console.log(0 * Infinity) // NaN
*/