Questions tagged [exp]

The Exponential - aka exp(x) function

The vast majority of the 21 posts tagged [exp] relate to the Exponential function i.e. f(x) = e^x where e is the number which is approximately 2.71828. This function is very important in statistics and many other fields.

235 questions
4
votes
3 answers

Can I use imp/exp tools to migrate database from Oracle 9 to Oracle 10

I'm subcontractor and my client wants to upgrade Oracle database from 9 to 10. Other vendor is going to perform the upgrade process, and I was asked to create whatever backup I need before the upgrade, and then recreate the environment in Oracle 10.…
Karol Kolenda
  • 1,660
  • 2
  • 25
  • 37
4
votes
3 answers

sympy hangs when trying to solve a simple algebraic equation

I recently reinstalled my python environment and a code that used to work very quickly now creeps at best (usually just hangs taking up more and more memory). The point at which the code hangs is: solve(exp(-alpha * x**2) - 0.01, alpha) I've been…
Shahar
  • 886
  • 1
  • 10
  • 22
4
votes
1 answer

Where in the python source code is math.exp() defined?

I want to known how to implement the math.exp() function in python. Where in the Python source code is math.exp() defined?
Yuansheng liu
  • 165
  • 1
  • 2
  • 10
4
votes
2 answers

Matlab Code To Approximate The Exponential Function

Does anyone know how to make the following Matlab code approximate the exponential function more accurately when dealing with large and negative real numbers? For example when x = 1, the code works well, when x = -100, it returns an answer of…
3
votes
1 answer

How to implement vectorize "exp" and "log" base-2 functions using AVX-512

For a game that I'm working on - need the ability to run million of "exp" calls on vectors. Basically void vector_exp(const double *x, const double *result, int n) { for (int i=0 ; i
dash-o
  • 13,723
  • 1
  • 10
  • 37
3
votes
1 answer

Algorithm to precisely compare two exponentiations for very large integers (order of 1 billion)

We want to compare a^b to c^d, and tell if the first is smaller, greater, or equal (where ^ denotes exponentiation). Obviously, for very large numbers, we cannot explicitely compute these values. The most common approach in this situation is to…
Nu Nunu
  • 376
  • 3
  • 14
3
votes
0 answers

Why function exp() first run so slow when it is called in a for loop?

I want to calculate some data in a for-loop.when I use exp(),I found it run so slow when it is first called.I use clock gettime to time it.when it is called firstly,it took about 6000ns,while subsequent calls took only about 200ns.My gcc version is…
dong lou
  • 33
  • 2
3
votes
1 answer

log(1+exp(X)) in Tensorflow (avoiding under and over flows)

I was debugging my program and I've realized that I my loss outputted NaN. These NaN values comes from the fact that I'm computing tf.log(1 + tf.exp(X)) where X is a 2d tensor. Indeed, When a value of X is large enough then tf.exp() returns +Inf and…
priseJack
  • 396
  • 2
  • 14
3
votes
1 answer

Numpy array apply a function only to some elements

I have a numpy array let's say that has a shape (10,10) for example. Now i want to apply np.exp() to this array, but just to some specific elements that satisfy a condition. For example i want to apply np.exp to all the elements that are not 0 or 1.…
Marco
  • 1,195
  • 3
  • 18
  • 30
3
votes
1 answer

Time complexity of e^x function

In CS, we had to emulate an HP 35 calculator, so I looked up a summation for e^x [in this case '^' means "to the power of"]. The formula is sum n=0 to infinity ( (x^n) / (n!) ) In my implementation, the first for loop is the summation loop: 1 + x…
Lightfire228
  • 546
  • 1
  • 5
  • 17
3
votes
1 answer

I want my y-axis to be exp-scaled (instead of log-scaled)

Say I have the following data that I want to plot: x <- seq(.01, 1, .01) plot(x) Great. However, I want to change the scaling of the y-axis. I know that I can do plot(x, log='y') Is there an equivalent of this for exponential scaling? (I know I…
Florian
  • 579
  • 1
  • 10
  • 19
3
votes
1 answer

How computationally expensive is `exp`?

I am currently hearing a lecture about automatic speech recognition (ASR). The last lecture was about vector quantization (VQ) and k nearest neighbors (kNN) as well as binary trees and gaussian mixture models (GMMs). According to the lecturer, VQ is…
Martin Thoma
  • 124,992
  • 159
  • 614
  • 958
3
votes
1 answer

including a negative number in the log sum of exponents, in python

I want to use numpy's logsumexp() in python 2.7. The formula I need to solve looks like this: log ( 1 + e^a1 + e^a2 + e^a3 + ... e^an - e^ax ) The last term which is a negative number just has to be appended on. Excluding this last term, I would do…
user961627
  • 12,379
  • 42
  • 136
  • 210
3
votes
1 answer

Attribute error: exp in python, works for some functions and not others

I am writing code to graph a few different functions, many with exponentials. This is what I have: >>> from fractions import Fraction >>> f13=Fraction('1/3') >>> f23=Fraction('2/3') >>> f43=Fraction('4/3') >>> f53=Fraction('5/3') >>>…
Hannah
  • 165
  • 2
  • 3
  • 13
3
votes
1 answer

Oracle dump file table data extraction to file (original exp format)

I have Oracle dump files created with original exp (not expdp) (EXPORT:V10.02.01, Oracle 10g). They contain only table data for four tables. 1) I want to extract the table data into files (flat/fixed-width, CVS, or other text file) without importing…
user3699974
  • 31
  • 1
  • 3
1 2
3
15 16