Questions tagged [exponential]

Exponential can refer to a mathematics function, a curve / graph / dataset that follows the growth of that function, the exponential distribution in statistics, or a format to represent floats.

Exponential can refer to a mathematics function, a curve / graph / dataset that follows the growth of that function, the exponential distribution in statistics, or a format to represent floats.

Definitions from wikipedia:

888 questions
3
votes
4 answers

How to find the exponent of 2 in an integer in Java?

I want to find the power of 2 that any integer contains. Like 12 = 2*2*3 so answer should come as 2, 28 = 2*2*7 so answer should come as 2 and so on. int powerOf2InNumber = (int)Math.floor(Math.log(number) / Math.log(2)); I tried the above code but…
3
votes
2 answers

Find the Nth root in R

How do we find the Nth root in R? 4^2 = sqrt(16) But what is the code snippet for the opposite transformation of; 4^7 = ???
Brad
  • 580
  • 4
  • 19
3
votes
2 answers

Coq power operator "^" unfound

I'm trying to define a power function in Coq, and I can't seem to find the relevant module to import: Require Import Coq.Numbers.NatInt.NZPow. Definition func (a b : nat) : nat := a+b*2^a. Gives me the following error: Unknown interpretation for…
OrenIshShalom
  • 5,974
  • 9
  • 37
  • 87
3
votes
1 answer

Bash exponentiation limit

I want to understand the reason maximum value for $[a**b] operation in Bash. $ echo $[2**62] 4611686018427387904 $ echo $[2**63] -9223372036854775808 $ echo $[2**64] 0
3
votes
2 answers

postgresql bigint too big?

Running PostgreSQL 11.4 (Debian 11.4-1.pgdg90+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 6.3.0-18+deb9u1) 6.3.0 20170516, 64-bit I tried this statement: SELECT CAST (2^63-1 as bigint); but got an unexpected error message: bigint out…
user1443098
  • 6,487
  • 5
  • 38
  • 67
3
votes
0 answers

MATLAB -Exponential (exp2) curve fitting function not giving the same output as the plot graph when using the fit values in the original equation

my brain is pickled with this one. Below are the two graphs I have plotted with exp2 function. The points do not match the curve, and this is ultimately changing my entire answer, as it is giving the wrong values out, and I cannot understand why?…
vbAmateur
  • 97
  • 9
3
votes
1 answer

Matlab power function randomly malfunctions

tk=linspace(0,1,101); R = 35.9; L = 3.98; C = 0.000360; P = ceil(R/(2*L)); M = ceil(sqrt( (1/(L*C)) - ( (R^2)/ (4*(L^2)) ))); syms q(t); syms i(t); q(t) = 40*exp((-R/(2*L))*t).*cos(t*sqrt((1/(L*C))-((R^2)/(4*L^2)))); i(t) =…
chilliefiber
  • 571
  • 2
  • 7
  • 18
3
votes
2 answers

R: approximating `e = exp(1)` using `(1 + 1 / n) ^ n` gives absurd result when `n` is large

So, I was just playing around with manually calculating the value of e in R and I noticed something that was a bit disturbing to me. The value of e using R's exp() command... exp(1) #[1] 2.718282 Now, I'll try to manually calculate it using x =…
self_learnt
  • 140
  • 6
3
votes
1 answer

Multiplying Intel MKL double arrays with MKL_Complex16 arrays (and exp)?

I've been learning to use Intel Math Kernel Library. Everything has been fine until now when I require to efficiently: Multiply an array of doubles by an array of MKL_Complex16s. Compute the exponential of iy where y is an array of…
Normandin
  • 69
  • 2
3
votes
3 answers

Running Time Complexity of my Algorithm - how do i compute this and further optimize the algorithm?

I designed a recursive algorithm and wrote it down in Python. When I measure the running time with different parameters, it seems to take exponential time. Furthermore; it takes more than half an hour to end with small numbers such as 50. (I didn't…
Murat Derya Özen
  • 2,154
  • 8
  • 31
  • 44
3
votes
2 answers

data compression - machine learning for exponential distribution

Are there any machine learning algorithms, prediction models that can help me compress exponentially distributed data? I have already encoded the file using golomb codes, which definitely saves tons of space, but this is not enough -- I need…
3
votes
3 answers

Python : arbitrary precision with floats

I tried to compute math.exp(9500) but encountered an OverflowError: math range error (it's roughly 6.3e4125). From this question it seems like it's due to a too large float, the accepted answer says "(...) is slightly outside of the range of a…
potato
  • 169
  • 8
3
votes
1 answer

Wrong Fit using nls function

When I try to fit an exponential decay and my x axis has decimal number, the fit is never correct. Here's my data below: exp.decay = data.frame(time,counts) time counts 1 0.4 4458 2 0.6 2446 3 0.8 1327 4 1.0 814 5 1.2 549 6 …
3
votes
0 answers

Online calculation for Pandas' exponential moving average

Generally, we calculate exponential moving averages as the following: y_t = (1 - alpha) * y_tminus1 + alpha * x_t where alpha is the alpha specified for the exponential moving average, y_t is the resulting moving average, and x_t is the new…
sos
  • 331
  • 2
  • 8
3
votes
1 answer

How to convert exponential number to decimal numbers in action script 3?

I am facing the problem on multiplying two decimal number in flex. When i am multiplying two decimal number the result is like a exponential number so i don't know how to get the decimal number as a result instead of getting an exponential number. I…
Babu
  • 440
  • 5
  • 23