3 #include "testing/testing.h"
11 TEST(math_base, CompareFFRelativeValid)
13 EXPECT_TRUE(
sizeof(
float) ==
sizeof(
int));
16 TEST(math_base, CompareFFRelativeNormal)
18 float f1 = 1.99999988f;
19 float f2 = 2.00000000f;
20 float f3 = 2.00000048f;
21 float f4 = 2.10000000f;
23 const float max_diff = FLT_EPSILON * 0.1f;
47 TEST(math_base, CompareFFRelativeZero)
50 float f1 = 4.2038954e-045f;
53 float fn1 = -2.8025969e-045f;
55 const float max_diff = FLT_EPSILON * 0.1f;
87 TEST(math_base, Log2FloorU)
126 TEST(math_base, FloorPowerOf10)
EXPECT_EQ(BLI_expr_pylike_eval(expr, nullptr, 0, &result), EXPR_PYLIKE_INVALID)
MINLINE unsigned int log2_ceil_u(unsigned int x)
float floor_power_of_10(float f)
MINLINE int compare_ff_relative(float a, float b, const float max_diff, const int max_ulps)
MINLINE unsigned int log2_floor_u(unsigned int x)
float ceil_power_of_10(float f)
TEST(math_base, CompareFFRelativeValid)