6 ms·
It should be noted that the number e = 2.71828 ... does not have any importance in practice, its value just satisfies the curiosity to know it, but there is no
by adrian_b 10mo ago
It should be noted that the number e = 2.71828 ... does not have any importance in practice, its value just satisfies the curiosity to know it, but there is no need to use it in any application.
The transcendental number whose value matters (being the second most important transcendental number after 2*pi = 6.283 ...) is ln 2 = 0.693 ... (and the value of its inverse log2(e), in order to avoid divisions).
Also for pi, there is no need to ever use it in computer applications, using only 2*pi everywhere is much simpler and 2*pi is the most important transcendental number, not pi.
- d-us-vb 10mo agoThis comment is quite strange to me. e is the base of the natural logarithm. so ln 2 is actually log_e (2). If we take the natural log of 2, we are literally using its value as the base of a logarithm. Does a number not matter "in practice" even if it's used to compute a more commonly use constant? Very odd framing.
- adrian_b 10mo agoThe number "e" itself is never needed in any application. It is not used for computing the value of ln(2) or of log2(e), which are computed directly as limits of some convergent series. As I have said, there is no reason whatsoever for knowing the value of e. Moreover, there is almost never a good choice to use the exponential function or the hyperbolic logarithm function (a.k.a. natural logarithm, but it does not really deserve the name "natural"). For any numeric computations, it is preferably to use everywhere the exponential 2^x and the binary logarithm. With this choice, the constant ln 2 or its inverse appears in formulae that compute derivatives or integrals. People are brainwashed in school into using the exponential e^x and the hyperbolic logarithm, because this choice was more convenient for symbolic computations done with pen on paper, like in the 19th century. In reality, choosing to have the proportionality factor in the derivative formula as "1" instead of "ln 2" is a bad choice. The reason is that removing the constant from the derivative formula does not make it disappear, but it moves it into the evaluation of the function and in any application much more evaluations of the functions must be done than computations of derivative or integral formulae. The only case when using e^x may bring simplifications is in symbolic computations with complex exponentials and complex logarithms, which may be needed in the development of mathematical models for some linear systems that can be described by linear systems of ordinary differential equations or of linear equations with partial derivatives. Even then, after the symbolic computation produces a mathematical model suitable for numeric computations it is more efficient to convert all exponential or logarithmic functions to use only 2^x and binary logarithms.
- d-us-vb 10mo agoFrom your other responses in this thread, it looks like you do concede that e is useful in symbolic computation, and others use the phraseology "how the function is implemented", which is quite a silly thing to say in a classical math context, but not in a computational context. I didn't understand immediately that you were talking about using values related to e in a computational context. But your comment about "brainwashing" seems a bit off. Are you saying that programmers bring e and ln with them into code when more effective constants exist for the same end? That's probably true. But brainwashing is far too strong, since things need to be taught in the correct order in math in order for each next topic to make sense. e really only comes in when learning derivative rules where it's explained "e is a number where when used as the base in an exponential function, that function's derivative is itself." Math class makes no pretense that you ought to use any of it to inform how you write code, so the brainwashing accusation seems off to me.
- qnleigh 10mo agoUuuuuum no? e^(ix) = cos(x) + isin(x). In particular e^(ipi) = -1 (1 + 1/n)^n = e. This is part of what makes e such a uniquely useful exponent base. Not applied enough? What about: d/dx e^x = e^x. This makes e show up in the solutions of all kinds of differential equations, which are used in physics, engineering, chemistry... The Fourier transform is defined as integral e^(iomega*t) f(t) dt. And you can't just get rid of e by changing base, because you would have to use log base e to do so. Edit: how do you escape equations here? Lots of the text in my comment is getting formatted as italics.
- deleted 10mo ago[deleted]
- lutusp 10mo ago> Edit: how do you escape equations here? Lots of the text in my comment is getting formatted as italics. Just escape any asterisks in your post that you want rendered as asterisks: this: \* gives: *.
- deleted 10mo ago[deleted]
- selecsosi 10mo agoGuessing the original comment hasn't taken complex analysis or has some other oriented view point into geometry that gives them satisfaction but these expressions are one of the most incredible and useful tools in all of mathematics (IMO). Hadn't seen another comment reinforcing this so thank you for dropping these. Cauchy path integration feels like a cheat code once you fully imbibe it. Got me through many problems that involves seemingly impossible to memorize identities and re-derivation of complex relations become essentially trivial
- adrian_b 10mo agoComplex exponentials and complex logarithms are useful in some symbolic computations, those involving formulae for derivatives or primitives, and this is indeed the only application where the use of e^x and natural logarithm is worthwhile. However, whenever your symbolic computation produces a mathematical model that will be used for numeric computations, i.e. in a computer program, it is more efficient to replace all e^x exponentials and natural logarithms with 2^x exponentials and binary logarithms, instead of retaining the complex exponentials and logarithms and evaluating them directly. At the same time, it is also preferable to replace the trigonometric functions of arguments measured in radians with trigonometric functions of arguments measured in cycles (i.e. functions of 2*Pi*x). This replacement eliminates the computations needed for argument range reduction that otherwise have to be made at each function evaluation, wasting time and reducing the accuracy of the results.
- lutusp 10mo ago> It should be noted that the number e = 2.71828 ... does not have any importance in practice, its value just satisfies the curiosity to know it, but there is no need to use it in any application. In calculations like compound financial interest, radioactive decay and population growth (and many others), e is either applied directly or derived implicitly. > ... 2*pi is the most important transcendental number, not pi. Gotta agree with this one.
- adrian_b 10mo agoWhen using the exponential e^x or the natural logarithm, the number "e" is never used. Only ln 2 or its inverse are used inside the function evaluations, for argument range reduction. In radioactive decay and population growth it is much simpler conceptually to use 2^x, not e^x, which is why this is done frequently even by people who are not aware that the computational cost of 2^x is lower and its accuracy is greater. In compound financial interest using 2^x would also be much more natural than the use of e^x, but in financial applications tradition is usually more important than any actual technical arguments.
- lutusp 10mo ago> When using the exponential e^x or the natural logarithm, the number "e" is never used. Only ln 2 or its inverse are used inside the function evaluations, for argument range reduction. That is only true in the special case of computing a half-life. In the general case, e^x is required. When computing a large number of cases and to avoid confusion, e^x is the only valid operator. This is particularly true in compound interest calculations, which would fall apart entirely without the presence of e^x and ln(x). > In radioactive decay and population growth it is much simpler conceptually to use 2^x, not e^x See above -- it's only valid if a specific, narrow question is being posed. > In compound financial interest using 2^x would also be much more natural than the use of e^x That is only true to answer a specific question: How much time to double a compounded value? For all other cases, e^x is a requirement. If your position were correct, if 2^x were a suitable replacement, then Euler's number would never have been invented. But that is not reality.
- BigTTYGothGF 10mo agoWhat an odd thing to say. I find that it shows up all the time (and don't find myself using 2pi any more than pi).
- adrian_b 10mo agoPi not multiplied by 2 has only one application, which is ancient. For most objects, it is easier to measure directly the diameter than the radius. Then you can compute the circumference by multiplying with Pi. Except for this conversion from directly measured diameters, one rarely cares about hemicycles, but about cycles. The trigonometric functions with arguments measured in cycles are more accurate and faster to compute. The trigonometric functions with arguments measured in radians have simpler formulae for derivatives and primitives. The conversion factor between radians and cycles is 2Pi, which leads to its ubiquity. While students are taught to use the trigonometric functions with arguments measured in radians, because they are more convenient for some symbolic computations, any angle that is directly measured is never measured in radians, but in fractions of a cycle. The same is true for any angle used by an output actuator. The methods of measurement with the highest precision for any physical quantity eventually measure some phase angle in cycles. Even the evaluations of the trigonometric functions with angles measured in radians must use an internal conversion between radians and cycles, for argument range reduction. So the use of the 2*Pi constant is unavoidable in almost any modern equipment or computer program, even if many of the uses are implicit and not obvious for whoever does not know the detailed implementations of the standard libraries and of the logic hardware. If trigonometric functions with arguments measured in radians are used anywhere, then conversions between radians in cycles must exist, either explicit conversions or implicit conversions. If only trigonometric functions with arguments measured in cycles are used, then some multiplications with 2Pi or its inverse appear where derivatives or primitives are computed. In any application that uses trigonometric functions millions of multiplications with 2Pi may be done every second. In contrast, a multiplication by Pi could be needed only at most at the rate at which one could measure the diameters of some physical objects for which there would be a reason to want to know their circumference. Because Pi is needed so much more rarely, it is simpler to just have a constant Pi_2 to be used in most cases and for the rare case of computing a circumference from the diameter to use Pi_2*D/2,
- jcranmer 10mo agoIt took me quite a bit to figure out what you're trying to say here. The importance of e is that it's the natural base of exponents and logarithms, the one that makes an otherwise constant factor disappear. If you're using a different base b, you generally need to adjust by exp(b) or ln(b), neither of which requires computing or using e itself (instead requiring a function call that's using minimax-generated polynomial coefficients for approximation). The importance of π or 2π is that the natural periodicity of trigonometric functions is 2π or π (for tan/cot). If you're using a different period, you consequently need to multiply or divide by 2π, which means you actually have to use the value of the constant, as opposed to calling a library function with the constant itself. Nevertheless, I would say that despite the fact that you would directly use e only relatively rarely, it is still the more important constant.
- constantcrying 10mo ago>but there is no need to use it in any application. Applications such as planes flying, sending data through wires, medical imaging (or any of a million different direct applications) do not count, I assume? Your naivety about what makes the world function is not an argument for something being useless. The number appearing in one of the most important algorithms should give you a hint about how relevant it is https://en.wikipedia.org/wiki/Fast_Fourier_transform https://en.wikipedia.org/wiki/Fast_Fourier_transform
- adrian_b 10mo agoI am sorry, but comments like this are caused by the naivety of not knowing how the function evaluations are actually implemented. None of the applications mentioned by you need to use the exponential e^x or the natural logarithm, all can be done using the exponential 2^x and the binary logarithm. The use of the less efficient and less accurate functions remains widespread only because of bad habits learned in school, due to the huge inertia that affects the content of school textbooks. The fast Fourier transform is written as if it would use e^x, but that has been misleading for you, because it uses only trigonometric functions, so it is irrelevant for discussing whether "e" or "ln 2" is more important, because neither of these 2 transcendental constants is used in the Fast Fourier Transform. Moreover, FFT is an example for the fact that it is better to use trigonometric functions with the arguments measured in cycles, i.e. functions of 2*Pi*x, instead of the worse functions with arguments measured in radians, because with arguments expressed in cycles the FFT formulae become simpler, all the multiplicative constants explicitly or implicitly involved in the FFT direct and inverse computations being eliminated. A function like cos(2*Pi*x) is simpler than cos(x), despite what the conventional notation implies, because the former does not contain any multiplication with 2*Pi, but the latter contains a multiplication with the inverse of 2*Pi, for argument range reduction.
- BigTTYGothGF 10mo agoI think that perhaps people are conflating the fourier transform (FT) with the fast fourier transform. It's true that the FFT does not use either of the transcendental numbers e or ln(2), but that's because the FFT does not use transcendental numbers at all! (Roots of unity, sure, but those are algebraic) > all the multiplicative constants explicitly or implicitly involved in the FFT direct and inverse computations being eliminated. Doesn't that basically get you a Hadamard transform?