|
@ -84,6 +84,22 @@ void test_DoubleDecimalBase_for_negative_decimal_exponent(void){ |
|
|
TEST_ASSERT_DOUBLE_WITHIN(0.0001, 0.000964, r3); |
|
|
TEST_ASSERT_DOUBLE_WITHIN(0.0001, 0.000964, r3); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void test_exponent_edge_case(void){ |
|
|
|
|
|
float r1, r2, r3, r4, r5; |
|
|
|
|
|
|
|
|
|
|
|
r1 = expIN(0, 2); |
|
|
|
|
|
r2 = expIN(0, 0); |
|
|
|
|
|
r3 = expIN(2, 0); |
|
|
|
|
|
r4 = expIN(-3, 0); |
|
|
|
|
|
r5 = expIN(0.5, -3); |
|
|
|
|
|
|
|
|
|
|
|
TEST_ASSERT_DOUBLE_WITHIN(0.0001, 1.0, r1); |
|
|
|
|
|
TEST_ASSERT_DOUBLE_WITHIN(0.0001, 1.0, r2); |
|
|
|
|
|
TEST_ASSERT_DOUBLE_WITHIN(0.0001, 0.0, r3); |
|
|
|
|
|
TEST_ASSERT_DOUBLE_WITHIN(0.0001, -1.0, r4); |
|
|
|
|
|
TEST_ASSERT_DOUBLE_WITHIN(0.0001, -1.0, r5); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
void test_Exponent_with_positive_number(void){ |
|
|
void test_Exponent_with_positive_number(void){ |
|
|
double r1, r2, r3; |
|
|
double r1, r2, r3; |
|
|
|
|
|
|
|
|