Python Forum
Calculate the Euler Number with more decimal places
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Calculate the Euler Number with more decimal places
#9
(Oct-18-2021, 11:09 PM)Pedroski55 Wrote: I was reading about the Euler Number, e.

I read it has been calculated to a trillion decimal places.

I would be happy with 100 decimal places.

I have 15 decimal places.

How could I get more decimal places?

def euler(n):
    print('Potential is:', n)
    inner = 1 + 1/n
    print('inner value is:', inner)
    e = inner**n
    print('e = ', e)

Hello, I just started learning Python because I thought that it had libraries which would let me do calculations with lots of decimal places.
If you go to this URL, it starts with a simple program in Java.
Then in the second half it shows how I used mpmath in Python to calculate the square root of two to one million decimal places:
https://andrews-programming-examples.blo...ulate.html
Pedroski55 likes this post
Reply


Messages In This Thread
RE: Calculate the Euler Number with more decimal places - by Andrew_Reid - Oct-30-2021, 07:16 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Not rounding to desired decimal places? pprod 2 2,606 Mar-05-2021, 11:11 AM
Last Post: pprod
  Can I format decimal places by column with a dictionary? Mark17 2 2,605 Dec-28-2020, 10:13 PM
Last Post: Mark17
  Creating table in MySQL db with decimal number issue dangermaus33 7 4,987 Nov-20-2020, 10:40 PM
Last Post: dangermaus33
  IndexError in Project Euler attempt CRISPRmetoopls 3 2,352 Aug-10-2020, 10:00 AM
Last Post: perfringo
  Numpy savetxt, how save number with decimal separator SpongeB0B 1 3,253 May-10-2020, 01:05 PM
Last Post: ThomasL
  How show decimal only for none whole number ? SpongeB0B 6 2,670 Mar-27-2020, 09:15 AM
Last Post: DeaD_EyE
  3rd problem from project Euler Richard_SS 6 3,269 Jun-05-2019, 02:06 PM
Last Post: DeaD_EyE
  testing for Decimal w/o importing decimal every time Skaperen 7 4,518 May-06-2019, 10:23 PM
Last Post: Skaperen
  graphing euler method rondo 1 2,531 May-03-2019, 01:03 AM
Last Post: scidam
  Search "Places near by me" or "where am I" in google maps barry76 1 2,713 Feb-07-2019, 04:10 PM
Last Post: snippsat

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020