0

Hi I want to evaluate the number e to arbitrary precision using python3. I am trying the numpy's built-in function in the following way

import numpy as np
print(np.exp(1))

which returns 2.71828182846. How can I increase the number of digits?

  • I am quite sure thats a constant in python, not implemented as "computation" for on the fly basis. You are not computing anything here. – Patrick Artner Jan 10 '18 at 16:57
  • Have a look at this answer: https://stackoverflow.com/a/30105063/7505395 for this question: https://stackoverflow.com/questions/30104929/where-in-the-numpy-source-code-are-the-constants-defined - `#define NPY_E 2.718281828459045235360287471352662498` – Patrick Artner Jan 10 '18 at 17:00

0 Answers0