Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Lightning Talk Outline
- ## Slide 1 - Infinity
- * Definition
- * Things comes in different sizes
- * Infinity is no different
- ## Slide 2 - Bijection
- * You can't test infinity by counting
- * If two sets can be paired, they’re the same size
- * If all the chairs in the room are taken, and no one is standing, I know there are exactly as many chairs as their are people
- ## Slide 3 - Natural Numbers
- * Natural numbers (counting numbers) represent the smallest kind of infinity
- * Unexpected behavior: all even numbers || all odd numbers == all natural numbers
- * Kick out all the odd numbers, and each even number is paired with 2x itself
- ## Slide 4 - Integers/Rational Numbers
- * A set of integers or rational numbers will share the same behavior
- ## Slide 5 - Real Numbers
- * Real numbers aren't countable
- * There is no way to line up the reals/naturals so that we are assigning exactly one real number to each natural number
- * Rational numbers are like the stars, irrational numbers are like the blackness
- ## Slide 6 - Transcendentals
- * Once you have one infinity, you can always make a larger one by creating a set of all subsets of that infinity
- ## Slide 7 - Achieving Infinity in Ruby
- * `(1 / 0) #=> ZeroDivisionError: divided by 0`
- * `(1.0 / 0) #=> Infinity`
- * `Infinity #=> NameError: uninitialized constant Infinity`
- * `Float::INFINITY #=> Infinity`
- * `(-1.0 / 0) #=> -Infinity`
- ## Slide 8 - Properties of Infinity in Ruby
- * `(Infinity == -Infinity) #=> false`
- * `(Infinity > -Infinity) #=> true`
- * `Infinity + 10 #=> Infinity`
- * `Infinity / 10 #=> Infinity`
- * `Infinity - 10 #=> Infinity`
- * `Infinity * 10 #=> Infinity`
- * `10**10000 #=> really big number`
- * `10**10000 + 0.01 #=> Infinity`
- ## Slide 8 - NaN
- * `Infinity - Infinity #=> NaN`
- * `Infinity * Infinity #=> NaN`
- ## Slide 9 - Use Cases
- * Full range of values as expressed by IEEE: `-Infinity < x < Infinity` includes all real numbers
- * Implementing lazy lists: `(200..Float::INFINITY).step(100).take(N)`
- * Examples
- ## Slide 10 - Infinity and Beyond
- * Toy Story 4 is in theatres now
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement