severalgos/3np1 mod problem C++  June 21, 2020
Namespaces | Functions
lib_3np1_mod__inline.hpp File Reference
#include <cassert>
#include <limits>
Include dependency graph for lib_3np1_mod__inline.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 lib_3np1_mod
 

Functions

value_type lib_3np1_mod::C (value_type n)
 Collatz C function. More...
 
value_type lib_3np1_mod::C_mask (value_type n, value_type mask)
 Return \(C(n) = \frac{n}{2}\) if n even,
\(C(n) = (3n + 1) \& mask\) if n odd. More...
 
value_type lib_3np1_mod::F (value_type n)
 F odd function. More...
 
value_type lib_3np1_mod::F_mask (value_type n, value_type mask)
 Return
\(F(0) = 0\)
\(F(n) = \frac{n}{2^k}\) if n even
\(F(n) = \frac{(3n + 1) \& mask}{2^k}\) if n odd
which k as large as possible = \(m_2(...)\). More...
 
value_type lib_3np1_mod::m2 (value_type n)
 \(m_2\) function. More...
 
value_type lib_3np1_mod::T (value_type n)
 Terras T function. More...
 
value_type lib_3np1_mod::T_mask (value_type n, value_type mask)
 Return
\(T(n) = \frac{n}{2}\) if n even
\(T(n) = \frac{(3n + 1) \& mask}{2}\) if n odd. More...
 

Detailed Description

Piece of severalgos. https://bitbucket.org/OPiMedia/severalgos

GPLv3 — Copyright (C) 2015 Olivier Pirson http://www.opimedia.be/

Definition in file lib_3np1_mod__inline.hpp.