sje30 / hotpo

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

hotpo

HOTPO = "half or triple plus one".

Collatz conjecture. http://oeis.org/A006577

Scientific American article: https://paperpile.com/app/p/b96eca8c-0ac1-0aa8-96f6-1c2ee37aca2d

See the main document

Part 1 - implementation in R

hotpo.R

Part 2 - implementation in Rcpp

hotpo.cpp

Part 3 - implementation in Julia

hotpo.jl

Instructions to run:

Rscript hotpo.R
julia hotpo.jl

[2020-10-26 Mon]

Update, thanks to Yujia Liu. If you are working on Windows with Rcpp, you will need to change "long int x" to "long long int x". the size of integers depends on compilers. reference. If you can, I'd advise windows users to use WSL2.

About


Languages

Language:HTML 49.3%Language:JavaScript 48.3%Language:C++ 1.0%Language:R 0.8%Language:Julia 0.5%Language:Makefile 0.1%