Gromacs  2025-dev-20241003-bd59e46
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Functions
functions.cpp File Reference
#include "gmxpre.h"
#include "gromacs/math/functions.h"
#include "config.h"
#include <cmath>
#include <cstdint>
#include <cstdlib>
#include <array>
#include <limits>
#include "gromacs/math/units.h"
#include "gromacs/math/utilities.h"
#include "gromacs/utility/gmxassert.h"
+ Include dependency graph for functions.cpp:

Description

Implements simple math functions.

Author
Erik Lindahl erik..nosp@m.lind.nosp@m.ahl@g.nosp@m.mail.nosp@m..com

Functions

unsigned int gmx::log2I (std::uint32_t x)
 Compute floor of logarithm to base 2, 32 bit unsigned argument. More...
 
unsigned int gmx::log2I (std::uint64_t x)
 Compute floor of logarithm to base 2, 64 bit unsigned argument. More...
 
unsigned int gmx::log2I (std::int32_t x)
 Compute floor of logarithm to base 2, 32 bit signed argument. More...
 
unsigned int gmx::log2I (std::int64_t x)
 Compute floor of logarithm to base 2, 64 bit signed argument. More...
 
std::int64_t gmx::greatestCommonDivisor (std::int64_t p, std::int64_t q)
 Find greatest common divisor of two numbers. More...
 
double gmx::erfinv (double x)
 Inverse error function, double precision. More...
 
float gmx::erfinv (float x)
 Inverse error function, single precision. More...