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:

765 questions
9
votes
1 answer

For three digit exponents Fortran drops the 'E' in the output

I'm just coming to Fortran90 from Python and, honestly, the hardest part so far has been getting used to the formatting codes for writing output. I've run across a formatting problem that I can't seem to google or fiddle my way out of, I have…
Dex
  • 195
  • 3
  • 12
9
votes
1 answer

Manipulating the numpy.random.exponential distribution in Python

I am trying to create an array of random numbers using Numpy's random exponential distribution. I've got this working fine, however I have one extra requirement for my project and that is the ability to specify precisely how many array elements have…
user2111574
  • 93
  • 1
  • 1
  • 4
9
votes
2 answers

Exponential of very small number in python

I am trying to calculate the exponential of -1200 in python (it's an example, I don't need -1200 in particular but a collection of numbers that are around -1200). >>> math.exp(-1200) 0.0 It is giving me an underflow; How may I go around this…
Pi_
  • 1,650
  • 4
  • 20
  • 24
8
votes
2 answers

Dynamic Programming in Mathematica: how to automatically localize and / or clear memoized function's definitions

In Mathematica 8.0, suppose I have some constants: a:=7 b:=9 c:=13 d:=.002 e:=2 f:=1 and I want to use them to evaluate some interlinked…
8
votes
2 answers

Why does one of these code segment work while the other throws an overflow

I am working with python and I am trying to find powers of really large numbers but something interesting which happens is that this throws a math overflow math.pow(1000, 1000) but this below seems to work although I do not know if the value…
cobie
  • 5,869
  • 8
  • 34
  • 58
8
votes
5 answers

Exponentiation in Ruby 1.8.7 Returns Wrong Answers

I met this problem when I tried to compute 3**557 in irb. Ruby and MacRuby both are installed in my Mac (OS X 10.8). And the version of ruby is 1.8.7, of MacRuby 0.12 (ruby 1.9.2). rib and macirb gave me two different answers on computation of…
Vej
  • 378
  • 1
  • 6
  • 24
7
votes
2 answers

How to represent e^(-t^2) in MATLAB?

I am a beginner in MATLAB, and I need to represent e(-t2). I know that, for example, to represent ex I use exp(x), and I have tried the following 1) tp=t^2; / tp=t*t; x=exp(-tp); 2) x=exp(-t^2); 3) x=exp(-(t*t)); 4) x=exp(-t)*exp(-t); What is the…
user573382
  • 343
  • 3
  • 10
  • 22
7
votes
1 answer

Convert exponential to a whole number in PHP

Possible Duplicate: Convert exponential number to decimal in php Is there a way to convert an exponential number to a whole number in PHP using built in functions? A format function? 1.2378147769392E+14 to 123781477693917
DLS
  • 5,003
  • 5
  • 35
  • 49
7
votes
2 answers

Kalman Filter vs Exponential Filter

I was wondering, what are the advantages and disadvantages of Kalman Filter and Exponential Filter? I have a multi-sensor fusion problem and I'm trying to decide which method to choose. I think, Kalman filter is more computationally complicated but…
Imelza
  • 303
  • 1
  • 7
  • 19
7
votes
1 answer

round exponential float to 2 decimals

I want to round exponential float to two decimal representation in Python. 4.311237638482733e-91 --> 4.31e-91 Do you know any quick trick to do that? Simple solutions like round(float, 2) and "%.2f"%float are not working with exponential…
Leszek
  • 1,190
  • 1
  • 10
  • 20
7
votes
3 answers

Force exponential format of ticks LIKE MATLAB does it automatically

I have two plots. In the first plot the values for the y-axis go up to 30000. Therefor, Matlab is labeling the axis instead of '30000' with '3' and the 'x10^4' ABOVE the plot. In the second plot the y-values just go til 10000. Due to the fact that…
user1812071
6
votes
1 answer

Fast SSE low precision exponential using double precision operations

I am looking for for a fast-SSE-low-precision (~1e-3) exponential function. I came across this great answer: /* max. rel. error = 3.55959567e-2 on [-87.33654, 88.72283] */ __m128 FastExpSse (__m128 x) { __m128 a = _mm_set1_ps (12102203.0f); /*…
ThreeStarProgrammer57
  • 2,065
  • 12
  • 21
6
votes
1 answer

Python- What colormap scheme should I use for exponential-ish data?

The issue I have a plot I'm trying to make for trends of precipitation rates around the world using gridded data. I can make the plot itself fine, but the color range is giving me issues. I can't figure out how to make the colormap better fit my…
ChristineB
  • 1,283
  • 6
  • 15
  • 35
6
votes
2 answers

Pandas: Exponentially decaying sum with variable weights

Similar to this question Exponential Decay on Python Pandas DataFrame, I would like to quickly compute exponentially decaying sums for some columns in a data frame. However, the rows in the data frame are not evenly spaced in time. Hence while…
pythonic metaphor
  • 9,476
  • 16
  • 59
  • 103
6
votes
1 answer

Raising number to fractional power java

I used the following code: double pow = 3/7; double num = 85; System.out.println(Math.pow(num, pow)); Expected result: 6.71... The output is 1.0 Any idea why?
Greg Peckory
  • 6,660
  • 15
  • 61
  • 101
1
2
3
50 51