Function digital_root

Synopsis

#include "breeze/mathematics/digital_root.hpp"

template <typename T>
constexpr int digital_root(T n, int base=10)

Description

Returns the digital root of the number n in base base.

Precondition
n >= 0 && base >= 2

Source

Line 30 in breeze/mathematics/digital_root.hpp.