Gromacs  2026.0-dev-20241204-d69d709
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Typedefs
functions.cpp File Reference
#include "gmxpre.h"
#include "gromacs/math/functions.h"
#include <cmath>
#include <cstddef>
#include <cstdint>
#include <initializer_list>
#include <limits>
#include <random>
#include <string>
#include <vector>
#include <gtest/gtest.h>
#include "testutils/refdata.h"
#include "testutils/testasserts.h"
+ Include dependency graph for functions.cpp:

Description

Tests for simple math functions.

Theoretically we'd like all math functions to match exactly, even in floating-point, but that is not realistic without excessive corrections to get the last ulp right - so in practice we target 1-2 ulp, which is VERY tight. However, to avoid worrying users we are a bit more generous and use 5-10 ulp as tolerance for the actual tests users will run through.

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

Typedefs

typedef ::testing::Types
< signed char, unsigned char,
short, unsigned short, int,
unsigned int, long, unsigned
long > 
gmx::test::anonymous_namespace{functions.cpp}::IntegerTypes