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
10
votes
3 answers

calculating a function in matlab with very small values

I am making a function in matlab to compute the following function: for this function we have: This is my implementation in matlab of the function: function [b]= exponential(e) %b = ? b= (exp (e) -1)/e; When I test the function with very small…
franvergara66
  • 10,524
  • 20
  • 59
  • 101
9
votes
4 answers

Calculating e^x without using any functions

We are supposed to calculate e^x using this kind of formula: e^x = 1 + (x ^ 1 / 1!) + (x ^ 2 / 2!) ...... I have this code so far: while (result >= 1.0E-20 ) { power = power * input; factorial = factorial * counter; result = power /…
Charles Khunt
  • 2,375
  • 5
  • 25
  • 25
9
votes
1 answer

geom_smooth and exponential fits

I am new to R and I'm having some difficulty plotting an exponential curve using ggplot2. I have a set of data below. DATA X Y x y 1 0.6168111 37.20637 0.6168111 37.20637 2 0.5478698 24.17084 0.5478698…
maherman
  • 93
  • 1
  • 1
  • 4
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_
  • 2,010
  • 5
  • 22
  • 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
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,313
  • 8
  • 37
  • 50
8
votes
1 answer

Java exponential distribution

I need to find a formula for exponential distribution of probability, but I don´t know how to find it. This formula has to have powerful statistical properties (it can´t throw away any result from random to keep indistructed seek of random…
Ján Яabčan
  • 743
  • 2
  • 10
  • 20
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
  • 7,023
  • 11
  • 38
  • 60
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
  • 390
  • 1
  • 7
  • 28
7
votes
6 answers

Recursive power function: Why does this work if there's no initial return value?

because power(base, exponent) has no return value unless exponent is 0, initially, shouldn't power(base, exponent -1) return 'undefined', and therefore be unmultipliable, initially? So, I am having trouble following the logic of this code. Why/how…
千里ちゃん
  • 530
  • 1
  • 4
  • 14
7
votes
0 answers

ConvergenceWarning when trying to use ExponentialSmoothing to forecast

I use ExponentialSmoothing from statsmodels (Version: 0.10.1) to fit and perform forecast on some data. For ease of use when setting the configurations, I write a function exp_smoothing_forecast that takes in an np array of data, a list of…
Huy Tran
  • 1,770
  • 3
  • 21
  • 41
7
votes
1 answer

What solver should I use if my objective function is an nonlinear (also exponential explanation) function? Python GEKKO

I'm trying to optimise an exponential objective function with GEKKO, but I don't know if the selected solver is the best one for these kind of problems. Is the selected one a valid choice?? import numpy as np 'GEKKO MODELING' from gekko import…
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
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
1
2
3
59 60