Vulpes  0.1.0
Versatile and parallel compUtational Library for high-order discontinuous Polytopal Element Simulations
Loading...
Searching...
No Matches
vulpes::random::internal Namespace Reference

Functions

double computePhiM (std::size_t m)
 Computes the solution to the equation \( x^{m+1} = x + 1 \) using Newton's method.

Function Documentation

◆ computePhiM()

double vulpes::random::internal::computePhiM ( std::size_t m)
inline

Computes the solution to the equation \( x^{m+1} = x + 1 \) using Newton's method.

Parameters
mThe exponent parameter in the equation.
Returns
The computed root \( \phi_m \).

This function uses Newton's method to iteratively solve the equation \(x^{m+1} = x + 1 \). The iterative formula is:

\[ \phi_{n+1} = \phi_n - \frac{\phi_n (\phi_n^m - 1) - 1}{(m+1) \phi_n^m - 1} \]

The iteration stops when the change ( \( \Delta\phi \)) is smaller than twice the machine epsilon for double.

Note
The function is part of the internal namespace and is intended for internal use.