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
2 answers

How to use Chi-square test for exponential distribution in R

In my dataset I have 15 observations and I want to test whether this distribution can be represented with an exponential distribution with rate=0.54. The variable x is as follows: table(x) x 0 1 2 4 5 7 8 10 2 1 4 2 2 2 1 1 Any…
brock
  • 181
  • 2
  • 10
3
votes
1 answer

Calculating the rolling exponential weighted moving average for each share price over time

This question is similar to my previous one: Shifting elements of column based on index given condition on another column I have a dataframe (df) with 2 columns and 1 index. Index is datetime index and is in format of 2001-01-30 .... etc and the…
3
votes
0 answers

2nd order symplectic exponentially fitted integrator

I have to solve equations of motion of a charged particle under the effect of electromagnetic field. Since I have to deal with speed over precision I could not use adaptive stepsize algorithms (like Runge-Kutta Cash-Karp) because they would take too…
3
votes
2 answers

Exponential Moving Average in php

I want to calculate the EMA (Exponential Moving Average) value in PHP. I've tried with following code but it's giving me 500 error. $real = array(12,15,17,19,21,25,28,12,15,16); $timePeriod = 3; $data =…
Mohit Tanwani
  • 6,608
  • 2
  • 14
  • 32
3
votes
1 answer

Wrong graph with scipy.optimize.curve_fit (similar to moving average)

I am trying to fit an exponential law into my data. My (x,y) sample is rather complicated to explain, so for general understanding and reproducibility I will say that: both variables are float and continuous, 0<=x<=100, and 0<=y<=1. from…
FaCoffee
  • 7,609
  • 28
  • 99
  • 174
3
votes
1 answer

bigdecimal subtraction results in exponential

I have the following code. BigDecimal b1 = new BigDecimal("1.12345678912345678"); BigDecimal b2 = new BigDecimal("1.12345678912345678"); System.out.println(b1.subtract(b2)); The output is : 0E-17 How can I avoid the exponential format ? The…
user2354566
  • 151
  • 1
  • 8
3
votes
3 answers

Function returning random double with exponential distribution in range (a,b)

I want to generate a random number from a to b. The problem is, the number has to be given with exponential distribution. Here's my code: public double getDouble(double low, double high) { double r; (..some…
Simon
  • 2,643
  • 3
  • 40
  • 61
3
votes
4 answers

Most efficient way to calculate the exponential of each element of a matrix

I'm migrating from Matlab to C + GSL and I would like to know what's the most efficient way to calculate the matrix B for which: B[i][j] = exp(A[i][j]) where i in [0, Ny] and j in [0, Nx]. Notice that this is different from matrix exponential: B =…
3
votes
2 answers

For a given integer Z, check if Z can be written as P^Q where Q and P are positive integers

Here is what I have tried but it is giving me wrong output. Can anyone point out what is the mistake? function superPower($n) { $response = false; $n = abs($n); if ($n < 2) { $response = true; } for ($i=2;$i<$n;$i++) { …
user3445122
3
votes
1 answer

PHP Image Zoom - Exponential scale

Iam trying to calculate a zoom Effect beetween 12 Images. Every Image is 100% larger then the one before. Its geting near to perfect, but there is only a issue at the transition beetween the images. It isn't fluid zoom beetween each image. Please…
dazzafact
  • 2,570
  • 3
  • 30
  • 49
3
votes
2 answers

convert very big exponential to decimal in c#

5.35754303593134E+300 to 53575430359313400000000000000000000 ... 000000000 Can anyone do this because this number is very large? I have tried: using System; using System.Collections.Generic; using System.Linq; using System.Text; using…
3
votes
0 answers

Exponential y-axis in ggplot2

I have some log-normal data. I would like to calculate means and confidence intervals on the log-scale and transform that for plotting on an the original scale. How can I do this in ggplot2? Here's an example where I generate the log-normal dataset…
Jonas Lindeløv
  • 5,442
  • 6
  • 31
  • 54
3
votes
1 answer

How do I define a float in Javascript?

So I want to give JS a number in exponential notation. Amazingly, I haven't found a reference on how to do this. Why doesn't this work? var tempdec = 8.85956e-8; I don't have to do var tempdec = parseFloat('8.95956e-8'); ...do I? ... answered…
Joshua Penman
  • 415
  • 1
  • 5
  • 13
3
votes
1 answer

Sympy: Multiplications of exponential rather than exponential of sum

I'm searching how to tell SymPy to use a multiplication of exponentials rather than an exponential of a sum. That is, it currently gives me exp(a + b) and I would want to get exp(a)*exp(b). There must be a fairly easy way but I can't seem to find…
Christian O'Reilly
  • 1,864
  • 3
  • 18
  • 33
3
votes
0 answers

How to plot exponential decay in geom_smooth in ggplot2 in R?

Data > dput(new.gapdata.cc) structure(list(gap.interval = structure(c(1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L, 15L, 16L, 17L, 18L, 19L, 20L, 21L, 22L, 23L, 24L, 25L, 26L, 27L, 28L, 29L, 30L, 34L ), .Label = c("[0.0568,10.1]",…
umair durrani
  • 5,597
  • 8
  • 45
  • 85