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
0
votes
0 answers

Code to find double time of an exponential in R

I have a set of data, containing values which lie on an exponential curve with a high Pearson co-efficient. I need a way to find the average double time. The code would have to find how long it takes a value x to reach 2x, then average all of those…
0
votes
2 answers

Why won't the exp function work in pyspark?

I'm trying to calculate odds ratios from the coefficients of a logistic regression but I'm encountering a problem best summed up by this code: import pyspark.sql.functions as F F.exp(1.2) This fails with py4j.Py4JException: Method exp([class…
CClarke
  • 503
  • 7
  • 18
0
votes
1 answer

how to solve an exponential with e base function in python?

I have this equation that I want to solve in python but I'm not sure if I'm following the right procedure, the equation is ((e^x)* a + b=0) where a and b are constants this my code the output is [-0.916290731874155 + 3.14159265358979*I] which I'm…
Aya Doma
  • 11
  • 2
0
votes
1 answer

Calculating large exponential shares / probabilities

Let there be an event space ES. Let there be some sets of objects OS[]. The probabilities of selecting any object are mutually disjoint. Now, assume that the size of each set is based on a number X[i] assigned to it. The size of each set rises…
Vega4
  • 969
  • 1
  • 11
  • 25
0
votes
0 answers

JWT Key -> exp claim show me an exception

I'm doing a program who can encode and decode a token with JWT method. My encode method works fine, but when i try to decode my token with an exp claim my program sent me this : Fatal error: Uncaught Firebase\JWT\ExpiredException: Expired token in…
Ant3xes
  • 51
  • 8
0
votes
1 answer

Why doesn't this function have a good precision?

I'm currently studying basic growth functions. Since R is not really good at dealing with symbollic equations, I'm writing both the growth function, as well as it´s derivative to later apply the Newton-Raphson method. The code is looking like…
0
votes
2 answers

How to craft this function in R?

I am currently trying to write a function that estimates energy expenditure of some lizards through E = e21.44 * (e(8.74901^10−20 / (1.3806488*10−23 *T). T in the equation is equal to the temperature in Kelvin. I know that if I were to plug in a…
0
votes
2 answers

What should I do with my functions that return wrong answers?

We could not use math.h I get wrong answers in cases with inputs greater than 54 in my sine function and inputs greater than 37 in my exp functions; I guess it overflows, what should I do? I want to write sine function and exp function on my own and…
Ali Hatami
  • 144
  • 10
0
votes
1 answer

How to extract table data from Oracle EXP dump file. First 1MB of the dump is corrupted, and database is lost

My Oracle DB is destroyed including backups (ransomware). I have a dump file 11GB in size. Exported by EXP with parameters FULL=Y. First objects in dump belong to SYSTEM USER. The dump is encrypted but only first 256kb, there is no sign of…
MrMgr
  • 125
  • 1
  • 6
0
votes
1 answer

modular exponentation funcation generate incorrect result for big input in c

I try two function for modular exponentiation for big base return wrong results, One of the function is: uint64_t modular_exponentiation(uint64_t x, uint64_t y, uint64_t p) { uint64_t res = 1; // Initialize result x = x % p; //…
superstack
  • 91
  • 5
0
votes
1 answer

Why is that I'm able to successfully return a large np.float128 but when I try to create the same np.float128 in numpy I just get inf?

I'm writing a function to take the exponent of a large number: def exp_large_float(x): return np.exp(np.float128(np.array([x]))) result = exp_large_float(800.) print(result) >>> [2.72637457e+347] print(result.dtype) >>> float128 I'm testing…
NewNameStat
  • 2,474
  • 1
  • 19
  • 26
0
votes
0 answers

Why am I getting the error: 'Mul' object has no attribute 'exp'?

I am trying desperately to be able to integrate a matrix and this is my 3rd or 4th approach. Every time I try to resolve an error, I get a new one and get stuck. This time, I am getting the…
0
votes
1 answer

For loop seems to be faster than a matrix operation

I have been working on logits for a while for which I need to use the built-in exp() function. This seems to be running slower for a large matrix compared to using a for loop with smaller chunks of the same matrix. In Matlab documentation and…
0
votes
1 answer

Using r : How to generate exponential dist with rate 1 using just runif function

Using R, how will I be able to generate an exponentially distributed random variable with rate 1 by only generating a uniformly distributed random variable(runif function in r).
Alex
  • 15
  • 2
0
votes
2 answers

How to use exp and sqrt properties correctly

-use double precision -use sqrt() and exponential function exp() -use * to compute the square -do not use pow() I am getting values they are just not anything as to what I expected. I tried making them all signed but it didn't change anything and…
JJCFTW
  • 1
  • 2