Advertisement
Guest User

Untitled

a guest
Jul 17th, 2019
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.08 KB | None | 0 0
  1. # Lightning Talk Outline
  2.  
  3. ## Slide 1 - Infinity
  4. * Definition
  5. * Things comes in different sizes
  6. * Infinity is no different
  7.  
  8. ## Slide 2 - Bijection
  9. * You can't test infinity by counting
  10. * If two sets can be paired, they’re the same size
  11. * 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
  12.  
  13. ## Slide 3 - Natural Numbers
  14. * Natural numbers (counting numbers) represent the smallest kind of infinity
  15. * Unexpected behavior: all even numbers || all odd numbers == all natural numbers
  16. * Kick out all the odd numbers, and each even number is paired with 2x itself
  17.  
  18. ## Slide 4 - Integers/Rational Numbers
  19. * A set of integers or rational numbers will share the same behavior
  20.  
  21. ## Slide 5 - Real Numbers
  22. * Real numbers aren't countable
  23. * There is no way to line up the reals/naturals so that we are assigning exactly one real number to each natural number
  24. * Rational numbers are like the stars, irrational numbers are like the blackness
  25.  
  26. ## Slide 6 - Transcendentals
  27. * Once you have one infinity, you can always make a larger one by creating a set of all subsets of that infinity
  28.  
  29. ## Slide 7 - Achieving Infinity in Ruby
  30. * `(1 / 0) #=> ZeroDivisionError: divided by 0`
  31. * `(1.0 / 0) #=> Infinity`
  32. * `Infinity #=> NameError: uninitialized constant Infinity`
  33. * `Float::INFINITY #=> Infinity`
  34. * `(-1.0 / 0) #=> -Infinity`
  35.  
  36. ## Slide 8 - Properties of Infinity in Ruby
  37. * `(Infinity == -Infinity) #=> false`
  38. * `(Infinity > -Infinity) #=> true`
  39.  
  40. * `Infinity + 10 #=> Infinity`
  41. * `Infinity / 10 #=> Infinity`
  42. * `Infinity - 10 #=> Infinity`
  43. * `Infinity * 10 #=> Infinity`
  44.  
  45. * `10**10000 #=> really big number`
  46. * `10**10000 + 0.01 #=> Infinity`
  47.  
  48. ## Slide 8 - NaN
  49. * `Infinity - Infinity #=> NaN`
  50. * `Infinity * Infinity #=> NaN`
  51.  
  52. ## Slide 9 - Use Cases
  53. * Full range of values as expressed by IEEE: `-Infinity < x < Infinity` includes all real numbers
  54. * Implementing lazy lists: `(200..Float::INFINITY).step(100).take(N)`
  55. * Examples
  56.  
  57. ## Slide 10 - Infinity and Beyond
  58. * Toy Story 4 is in theatres now
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement