diff --git a/test/test_exponent.c b/test/test_exponent.c index bbc61e3..0439cac 100644 --- a/test/test_exponent.c +++ b/test/test_exponent.c @@ -60,6 +60,22 @@ void test_DoubleDecimalBase_for_positive_decimal_exponent(void){ TEST_ASSERT_DOUBLE_WITHIN(0.0001, 1.332474, r3); } +void test_DoubleBase_for_negative_decimal_exponent(void){ + float r1, r2, r3; + + r1 = expIN(-0.125, 3.0); + r2 = expIN(-0.5, 2.0); + r3 = expIN(-0.12923, 10.0); + + printf("%lf\n",r1); + printf("%lf\n",r2); + printf("%lf\n",r3); + + TEST_ASSERT_DOUBLE_WITHIN(0.0001, 0.871685, r1); + TEST_ASSERT_DOUBLE_WITHIN(0.0001, 0.707106, r2); + TEST_ASSERT_DOUBLE_WITHIN(0.0001, 0.742625, r3); +} + void test_Exponent_with_positive_number(void){ double r1, r2, r3;