Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SQLで正規分布の乱数生成 #51

Open
takegue opened this issue Nov 26, 2022 · 0 comments
Open

SQLで正規分布の乱数生成 #51

takegue opened this issue Nov 26, 2022 · 0 comments

Comments

@takegue
Copy link
Owner

takegue commented Nov 26, 2022

  select 
    -- normal distribution: box-muller
    sqrt(-2 * ln(rand())) * cos(rand() * 4 * atan(1.0)) as r
  from
    unnest(generate_array(1, 10000)) as v 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant