Skip to content

Instantly share code, notes, and snippets.

@satoryu
Created April 28, 2019 08:47
Show Gist options
  • Select an option

  • Save satoryu/2e1fc20a64ae110f0cc1f67f22a802da to your computer and use it in GitHub Desktop.

Select an option

Save satoryu/2e1fc20a64ae110f0cc1f67f22a802da to your computer and use it in GitHub Desktop.
(1...).each { |x| puts (1 - 1.0/x)**x }
@satoryu

satoryu commented Apr 28, 2019

Copy link
Copy Markdown
Author

Usage

ruby -e '(1...).each { |x| puts (1 - 1.0/x)**x }'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment