exp Questions

7

Solved

I am trying out the fast Exp(x) function that previously was described in this answer to an SO question on improving calculation speed in C#: public static double Exp(double x) { var tmp = (long)...
Barefoot asked 11/5, 2012 at 13:26

7

Solved

How can I write 1-e^(-value1^2/2*value2^2) in Python? I don't know how to use power operator and e.
Foredoom asked 25/8, 2016 at 20:57

6

Solved

Using numpy, I have this definition of a function: def powellBadlyScaled(X): f1 = 10**4 * X[0] * X[1] - 1 f2 = numpy.exp(-numpy.float(X[0])) + numpy.exp(-numpy.float(X[1])) - 1.0001 return f1 ...
Justicz asked 4/3, 2012 at 22:18

1

Solved

Here's the code I'm trying to convert: the double version of VDT's Pade Exp fast_ex() approx (here's the old repo resource): inline double fast_exp(double initial_x){ double x = initial_x; doubl...
Tricyclic asked 25/1, 2019 at 11:44

1

Solved

I have a program that were giving slithly different results under Android and Windows. As I validate the output data against a binary file containign expected result, the difference, even if ...
Tightrope asked 18/1, 2019 at 8:30

3

Solved

I'm making a code that essentially takes advantage of SSE2 on optimizing this code: double *pA = a; double *pB = b[voiceIndex]; double *pC = c[voiceIndex]; for (int sampleIndex = 0; sampleIndex &...
Lizzielizzy asked 20/12, 2018 at 16:10

2

Solved

When I execute a simple x64 application with the following code, I get different results on Windows PCs with a i7-3770 and i7-4790 CPU. #include <cmath> #include <iostream> #include &l...
Wary asked 22/8, 2017 at 15:22

2

Solved

Are there any functions in the c++ standard library that calculate the log of the sum of exponentials? If not, how should I go about writing my own? Do you have any suggestions not mentioned in thi...
Paterson asked 29/8, 2017 at 16:9

3

Solved

The GCC implementation of the C mathematical library on Debian systems has apparently an (IEEE 754-2008)-compliant implementation of the function exp, implying that rounding shall always be correct...
Smothers asked 3/6, 2017 at 16:52

1

Solved

I am attempting to write a program that executes Monte Carlo simulations using OpenCL. I have run into an issue involving exponentials. When the value of the variable steps becomes large, approxima...
Guillerminaguillermo asked 15/5, 2017 at 11:3

2

Solved

As in title, I need to perform numpy.exp on a very large ndarray, let's say ar, and store the result in ar itself. Can this operation be performed in-place?
Phionna asked 20/12, 2016 at 15:25

3

I'm very confused as to what np.exp() actually does. In the documentation it says that it: "Calculates the exponential of all elements in the input array." I'm confused as to what exactly this mean...
Metternich asked 11/8, 2015 at 21:8

2

Solved

I'm attempting to calculate e^x using recursion, e^x = e^(x/2)*e^(x/2), and the third order Maclaurin expansion for e^x and the script keeps returning 1. I'm not looking for a higher accuracy...
Paunchy asked 16/7, 2015 at 20:28

2

Solved

I have a table with 2 column: No. Name Serial 1 Tom 1 2 Bob 5 3 Don 3 4 Jim 6 I want to add a column whose a content is multiply Serial column like this: No. Name Serial Multiply 1 Tom 2 2 2 Bo...
Enterpriser asked 10/6, 2015 at 2:32

2

Solved

OK, I know the answer, but being inspired by this question, I'd like to get some nice opinions about the following: Why the Rcpp exercise below is ca. 15% faster (for long vectors) than the built-i...
Mme asked 17/10, 2014 at 18:21

2

Solved

I need to compute a normalized exponential of a vector in Matlab. Simply writing res = exp(V)/sum(exp(V)) overflows in an element of V is greater than log(realmax) = 709.7827. (I am not sure a...
Tijuana asked 14/5, 2014 at 21:38

1

I need to calculate f(x)=exp(A*x) repeatedly for a tiny, variable column vector x and a huge, constant matrix A (many rows, few columns). In other words, the x are few, but the A*x are many. My pro...
Diabolo asked 24/4, 2014 at 9:10

1

Solved

If I want to take the product of a list of floating point numbers, what's the worst-case/average-case precision lost by adding their logs and then taking exp of the sum as opposed to just multiplyi...
Melissiamelita asked 7/4, 2013 at 3:4

1

Solved

I want to known how to implement the math.exp() function in python. Where in the Python source code is math.exp() defined?
Televise asked 10/3, 2013 at 11:11

1

Solved

I'm trying to generate a beautiful legend in R plots. I have a factor=1e-5, that should appear nicely formatted in the legend. I found a nice function in the package sfsmisc, that transforms number...
Tedesco asked 8/3, 2013 at 9:13

1

I got a code here, and when I run them on Win and Mac OS, the precision of the results is different, anyone can help? const double c = 1 - exp(-2.0); double x = (139 + 0.5) / 2282.0; x = ( 1 - exp...
Tropho asked 5/3, 2013 at 6:3

4

Solved

I've got a fixed point class (10.22) and I have a need of a pow, a sqrt, an exp and a log function. Alas I have no idea where to even start on this. Can anyone provide me with some links to useful...
Colloid asked 11/1, 2011 at 12:12

2

Solved

I am confused about using expm1 function in java The Oracle java doc for Math.expm1 says: Returns exp(x) -1. Note that for values of x near 0, the exact sum of expm1(x) + 1 is much closer to th...
Conduction asked 17/8, 2012 at 19:33

1

Solved

I use the formula exp(X) as the rate for a markov chain. So the ratio of selecting one link over another is exp(X1)/exp(X2). My problem is that sometimes X is very large, so exp(X) will exceed the ...
Daughterinlaw asked 17/8, 2012 at 19:10

6

I've found rather poor performance running some computational code under Ubuntu on a brand new headless workstation machine I'm using for scientific computation. I noticed a difference in speed run...
Spore asked 23/2, 2012 at 17:3

© 2022 - 2024 — McMap. All rights reserved.