|
|
@ -40,6 +40,22 @@ void test_DoubleBase_ForNegativeExponent(void){ |
|
|
|
TEST_ASSERT_EQUAL_FLOAT(0.25, r3); |
|
|
|
} |
|
|
|
|
|
|
|
void test_DoubleBase_for_positive_decimal_exponent(void){ |
|
|
|
float r1, r2, r3; |
|
|
|
|
|
|
|
r1 = expIN(0.45, 3.0); |
|
|
|
r2 = expIN(0.5, 9.0); |
|
|
|
r3 = expIN(0.5, 2.0); |
|
|
|
|
|
|
|
printf("Result 1: %f\n", r1); |
|
|
|
printf("Result 2: %f\n", r2); |
|
|
|
printf("\nResult 3: %lf\n\n", r3); |
|
|
|
|
|
|
|
TEST_ASSERT_DOUBLE_WITHIN(0.0001, 1.639474, r1); |
|
|
|
TEST_ASSERT_DOUBLE_WITHIN(0.0001, 3.0, r2); |
|
|
|
TEST_ASSERT_DOUBLE_WITHIN(0.0001, 1.414213, r3); |
|
|
|
} |
|
|
|
|
|
|
|
void test_Exponent_with_positive_number(void){ |
|
|
|
double r1, r2, r3; |
|
|
|
|
|
|
|