Переименование типов в соответствии со стилем POSIX, отказ от префикса bg_

This commit is contained in:
Andrey Pokidov 2025-01-13 21:31:26 +07:00
parent d2a25823a5
commit 605afabd94
25 changed files with 1109 additions and 1035 deletions

View file

@ -6,13 +6,13 @@
#define TEST_RESULT_SUCCES 0
#define TEST_RESULT_FAILED 100
#define TEST_BG_FP32_EPSYLON 1E-6f
#define TEST_BG_FP32_TWO_EPSYLON 2E-6f
#define TEST_BG_FP32_SQUARE_EPSYLON 1E-12f
#define TEST_FP32_EPSYLON 1E-6f
#define TEST_FP32_TWO_EPSYLON 2E-6f
#define TEST_FP32_SQUARE_EPSYLON 1E-12f
#define TEST_BG_FP64_EPSYLON 1E-13f
#define TEST_BG_FP64_TWO_EPSYLON 2E-13f
#define TEST_BG_FP64_SQUARE_EPSYLON 1E-26f
#define TEST_FP64_EPSYLON 1E-13f
#define TEST_FP64_TWO_EPSYLON 2E-13f
#define TEST_FP64_SQUARE_EPSYLON 1E-26f
void print_test_section(const char * name);
@ -22,7 +22,7 @@ void print_test_success();
void print_test_failed();
inline int test_bg_fp32_are_equal(const float value1, const float value2, const float epsylon)
inline int test_fp32_are_equal(const float value1, const float value2, const float epsylon)
{
if (-1.0f <= value1 && value1 <= 1.0f) {
const float difference = value1 - value2;
@ -36,7 +36,7 @@ inline int test_bg_fp32_are_equal(const float value1, const float value2, const
return value1 * (1.0f + epsylon) <= value2 && value2 * (1.0f + epsylon) <= value1;
}
inline int test_bg_fp64_are_equal(const double value1, const double value2, const double epsylon)
inline int test_fp64_are_equal(const double value1, const double value2, const double epsylon)
{
if (-1.0 <= value1 && value1 <= 1.0) {
const double difference = value1 - value2;