Gromacs
2026.0-dev-20241204-d69d709
|
#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"
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.
Typedefs | |
typedef ::testing::Types < signed char, unsigned char, short, unsigned short, int, unsigned int, long, unsigned long > | gmx::test::anonymous_namespace{functions.cpp}::IntegerTypes |