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
#10
(Oct-22-2021, 12:17 AM)Pedroski55 Wrote: Thanks for your replies!

I use Ubuntu 20.04

I only tried to install gmpy2 using pip.

I'm not very clear about installing from source, I never do that, but I suppose I will have to try!

I happen to be the maintainer of gmpy2. I'm sorry that you have issues installing gmpy2. Here are my recommendations.

If you are using a version of Python provided by a Linux distribution, I recommend installing the version of gmpy2 provided by that distribution. For Ubuntu you can use a GUI tool like "synaptic" or use the following command from the Linux command prompt:

sudo apt install python3-gmpy2

Installing from PyPi using pip is unfortunately not as easy as it should be. The last "official" release was version 2.0.8. Since then, I've released several alpha, beta, and release candidate versions of 2.1.0, but pip will only offer official releases and hides the existence of development versions. You can force pip to provide development versions using the following command:

pip install --pre gmpy2

Installing from source is relatively easy on Linux. But I would only do this both of the previous options fail. gmpy2 requires the development files for GMP (provides mpz and mpq), MPFR (provides mpfr), and MPC (provides mpc). The easiest way to install the required files is the following command:

sudo apt install libmpc-dev

Then try compiling from source with the command:

pip install --pre --no-binary :all: gmpy2

I hope this helps.

Case

p.s. My first multiple precision calculation was calculating e to 3,110 decimal places on an HP41-CV calculator. It took 5 days. My effort was inspired by article in Byte magazine written by Steve Wozniak.

https://downloads.reactivemicro.com/User...201981.pdf
Gribouillis likes this post
Reply


Messages In This Thread
RE: Calculate the Euler Number with more decimal places - by casevh - Oct-31-2021, 03:46 AM

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