diff --git a/src/log/log.cpp b/src/log/log.cpp index 1a7778685..e489e6905 100644 --- a/src/log/log.cpp +++ b/src/log/log.cpp @@ -59,6 +59,7 @@ namespace steppable::__internals::arithmetic // /-\ +--------------------------------------------+ // / ! \ | WARNING: DO NOT CALL THIS METHOD DIRECTLY! | // /-----\ +--------------------------------------------+ + // TODO: Improve accuracy. // 4 3 2 // (x - 1)(137x + 1762x + 3762x + 1762x + 137) // ln(x) = ------------------------------------------------ diff --git a/src/power/powerReport.cpp b/src/power/powerReport.cpp index de9ba18dd..5877456a9 100644 --- a/src/power/powerReport.cpp +++ b/src/power/powerReport.cpp @@ -123,7 +123,7 @@ std::string reportPower(const std::string_view _number, ss << number; } - if (steps == 1) + if (steps >= 1) ss << numberOrig << makeSuperscript(static_cast(raiseTo)) << " = " << number; else if (steps == 0) ss << number; diff --git a/src/root/root.cpp b/src/root/root.cpp index 8c827ce4d..80e42bff0 100644 --- a/src/root/root.cpp +++ b/src/root/root.cpp @@ -105,8 +105,8 @@ namespace steppable::__internals::arithmetic auto radicand = add(y, newAvg, 0); auto test = power(radicand, base, 0); - if (compare(newAvg, "0", 0) == "2") - return numUtils::roundDown(numUtils::roundOff(radicand, 1)); + if (compare(newAvg, "0", 0) == "2" or compare(test, number, 0) == "2") + return roundDown(numUtils::roundOff(radicand, 1)); if (compare(test, number, 0) == "1") x = radicand; else if (compare(test, number, 0) == "0") diff --git a/tests/testHyp.cpp b/tests/testHyp.cpp index 00c990b64..c3b9cf660 100644 --- a/tests/testHyp.cpp +++ b/tests/testHyp.cpp @@ -61,8 +61,6 @@ SECTION(Test inverse hyperbolic sine) _.assertIsEqual(asinh("0.5", 4), "0.4812"); SECTION_END() -// TODO: FIX THESE -// - Incorrect return values. SECTION(Test inverse hyperbolic cosine) _.assertIsEqual(acosh("1.25", 4), "0.6931"); SECTION_END()