Questions tagged [eulers-number]

Euler's number (usually denoted e in mathematics) is a transcendental constant approximately equal to 2.718281828. It is the base of natural logarithms.

The mathematical constant e (wikipedia) can be defined in various equivalent ways:

  • the unique positive real number such that the derivative of the function f(x) = ex is always equal to ex
  • the unique positive real number such that the derivative of the function loge x = 1 / x
  • the limit as n tends to infinity of (1 + 1/n) ^ n
  • the sum of the infinite series 1 / n! as n goes from zero to infinity

Ths first of these accounts for the frequency with which e crops up in models involving compounded growth.

64 questions
1
vote
2 answers

Calculating Euler's constant with OCaml

I started learning OCaml today. I already knew Scheme so I thought it would be good to try to translate some example Scheme programs to ML. I have some code below for calculating Euler's number which works, but it does not work in OCaml. I get this…
Caspian Ahlberg
  • 934
  • 10
  • 19
1
vote
1 answer

How can I print a number with a high quantity of decimals in the console?

It seems a very basic question, but I have been having this problem for a while. I am coding a program in Eclipse IDE which calculates a high quantity of decimals of the Euler's number, and it works fine with quantities like 100, 400, 1000... But…
Cardstdani
  • 4,999
  • 3
  • 12
  • 31
1
vote
2 answers

Struggling to get convergence to Euler's number

Hi there I’ve been working on trying to plot the convergence of 'e' through using the equation 1/N! with limits from 0 to 9. clc,clear terms=[1]; x=10; for i=2:x terms(i,1)=terms(i-1,1) + 1/factorial(i); end disp(terms) xplotrange =…
KC ReLoDZz
  • 33
  • 4
1
vote
0 answers

Euler Method for Lotka Volterra going wrong?

I am trying to do the Lotka-Volterra model using the Euler method but I am not getting the right graph at all. This is on Python. I have tried changing the tstep and arrays which has improved it. I have noticed I cannot make my time step bigger than…
1
vote
2 answers

Project Euler: Largest palindrome product of two 3-digit number

I get 580085, why is it wrong? And is there another way to check whether a number is a palindrome? def reverse(str, aux=''): count = len(str) while count > 0: aux += str[count-1] count -= 1 return aux def…
user8831891
1
vote
0 answers

Extraction of binary image from using auto-tuned threshold values obtained from the correlation of Image euler numbers

I'm trying to extract the lung region from chest x-ray images using the method described in - L.P Wong, H.T Ewe. "A Study of Lung Cancer Detection using Chest X-ray Images". 3rd APT Telemedicine Workshop 2005, 27-28th January 2005, Kuala Lumpur,…
Chaitanya
  • 147
  • 1
  • 11
1
vote
1 answer

Eulers Phi of Huge numbers

Its easy to compute eulers phi of small numbers, there are even many online sites that offer such functions. But what when the numbers are really huge, I mean like 2^128? How can I compute an eulers phi function of such high number? Can I use my…
Sick654
  • 79
  • 9
1
vote
2 answers

How to calculate holes number of the image (binary) using opencv function

I want to calculate the Euler Number so i need number of connected component and number of the holes in the image. I found the how to find number of connected component. Using this code; vector>contours; vectorhierarchy;…
0
votes
0 answers

Calling a function inside another function in R

I'm trying to create and use a function that calculates the factorial of a given number and use this in an another function that calculates the Euler's Number. However i don't understand why the code is giving the + signs on the output. End project…
Maxis
  • 1
0
votes
1 answer

Eulers totient function python code optimization

I was solving Euler's project question number 70 and my Euler's totient function was slow. Can anyone help? Euler project Question 70 description: Euler's Totient function, φ(n) [sometimes called the phi function], is used to determine the number of…
0
votes
1 answer

Calculator: Faculty and eulers number

I have to program a calculator which can calculate a faculty and a eulerian number. these formulars are given: faculty: Number1! = 1*2*...*Number1 eulerian number: Number1 …
Anna
  • 1
  • 1
0
votes
2 answers

Why does my Euler's number program always print 2.00000?

This C Program should calculate Euler's number up to a certain point. it will calculate as long as the difference of 1/(n-1)! - 1/n! is smaller than the number the user entered. The problem : no matter what number I enter it says that the Euler's…
Erik13
  • 9
  • 1
0
votes
1 answer

Extract Euler rotation from matrix using Maya

I am trying to extract the rotation of an object based on these values: [ 0.00000000, 0.00000000, 0.00000000, 0.33333334, -0.53828228, 0.00000000, 0.66666669, -1.07656455, 0.00000000, 1.00000000, -1.61484683, 0.00000000 ] I am not quite sure how to…
Phil
  • 77
  • 3
0
votes
0 answers

How to compute first N digits of Euler number in c++?

I have a homework in which I need to compute and print out first 200 digits of Euler number. I am pretty much know how to compute it for double type using Taylor series, but it will compute only about 10 digits because of double precision. I need…
Kemsikov
  • 452
  • 3
  • 13
0
votes
1 answer

How do I allow my code that evaluates string equations to work with PI and E

I took this code from a previously answered question and I am trying to expand it so that it works with E and PI when the String contains "E" and "PI". I don't really understand how the code works because I am pretty new to Java and the explanation…
Musskk
  • 27
  • 5