|
|
@ -65,5 +65,19 @@ void test_logarithmic_function_with_integers(void){ |
|
|
|
TEST_ASSERT_DOUBLE_WITHIN(0.000001, 2.0, r4); |
|
|
|
} |
|
|
|
|
|
|
|
void test_logarithmic_function_with_decimals(void){ |
|
|
|
double r1, r2, r3, r4; |
|
|
|
|
|
|
|
r1 = logX(0.1289, 26.5); |
|
|
|
r2 = logX(7.64, 8.314); |
|
|
|
r3 = logX(3.0, 2.4587); |
|
|
|
r4 = logX(9.0, 94.6584); |
|
|
|
|
|
|
|
TEST_ASSERT_DOUBLE_WITHIN(0.000001, -1.599607, r1); |
|
|
|
TEST_ASSERT_DOUBLE_WITHIN(0.000001, 1.041577, r2); |
|
|
|
TEST_ASSERT_DOUBLE_WITHIN(0.000001, 0.818881, r3); |
|
|
|
TEST_ASSERT_DOUBLE_WITHIN(0.000001, 2.070919, r4); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
#endif // TEST |