Skip to content

Commit

Permalink
Fix build errors on Linux.
Browse files Browse the repository at this point in the history
  • Loading branch information
ZCG-coder committed Aug 2, 2024
1 parent aade7fe commit 2ea65f4
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions src/log/log.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,43 +29,20 @@
*/

#include "argParse.hpp"
#include "constants.hpp"
#include "fn/basicArithm.hpp"
#include "getString.hpp"
#include "logReport.hpp"
#include "output.hpp"
#include "rounding.hpp"
#include "util.hpp"

#include <cstdlib>
#include <iostream>
#include <string>

using namespace steppable::__internals::arithmetic;
using namespace steppable::__internals::utils;
using namespace steppable::localization;
using namespace std::literals;

double ln(double x, double epsilon)
{
// x - exp(y )
// n
// y = y + 2 * --------------
// n + 1 n x + exp(y )
// n

double yn = x - 1.0; // using the first term of the Taylor series as initial-value
double yn1 = yn;

do
{
yn = yn1;
yn1 = yn + 2 * (x - exp(yn)) / (x + exp(yn));
} while (fabs(yn - yn1) > epsilon);

return yn1;
}

namespace steppable::__internals::arithmetic
{
std::string _log(const std::string& x, const size_t _decimals)
Expand Down

0 comments on commit 2ea65f4

Please sign in to comment.