0

I'm developing my own Real Number class in Python for my projects. In that class, user can store or access $ n \in \mathbb{N} $ number of digits after the decimal point.

Everything is completed, except the power function. I want to calculate the power using natural logarithm. I'm learning mathematics now, but unfortunately, currently I haven't cover real analysis. But I need help from that field.

I'm using Taylor's series of natural logarithm. But I want the natural log series for any x greater than 1 also.

Can anyone guide me to the right (and easy, if possible) path to implement the natural log series?

And one more query - user can select up to how many digit he/she wants in answer after the decimal point. So, to get n number of digits accurately after the point, how many terms I need to take in the series? Does there any general formula exist?

J. W. Tanner
  • 60,406
  • You could apply Newtons method to solve $e^y=x$ , the main problem is to find a suitable start value. – Peter Sep 22 '23 at 15:51
  • Hi @DietrichBurde, let me see and understand the answer. Thank you for suggesting this. – Debtanu Gupta Sep 22 '23 at 15:55
  • Hello @Peter, I've already tried using that method. And yes, I was also stuck onto that starting value problem.

    After that, I got this answer. https://math.stackexchange.com/questions/4730319/how-to-make-nearly-perfect-assumption-of-x-0-to-proceed-further-with-newton

    – Debtanu Gupta Sep 22 '23 at 15:55
  • 1
    You probably want something similar to this question. – user10354138 Sep 22 '23 at 16:22

0 Answers0