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

PHP outputting numbers in exponential form

When i'm outputting some of my double variables they're being written in exponential form using fwrite. Can i set some defaults in PHP where whenever a variable is displayed (copied or stored) it always happens in decimal format? To be precise the…
n_openid
  • 93
  • 1
  • 7
4
votes
2 answers

PHP how to convert number exponential number to string?

I have a number stored in scientific notation 2.01421700079E+14 I've tried using float, string, int and I can't get 0201421700079085 from 2.01421700079E+14 1. echo (float)$awb; 2. echo number_format($awb, 0, '', ''); 3. echo (int)$awb; 4. echo…
4
votes
4 answers

Element wise exp() of scipy sparse matrix

I have a very big sparse csc_matrix x. I want to do elementwise exp() on it. Basically what I want is to get the same result as I would have got with numpy.exp(x.toarray()). But I can't do that(my memory won't allow me to convert the sparse matrix…
Bishwajit Purkaystha
  • 1,975
  • 7
  • 22
  • 30
4
votes
4 answers

C - Exponentiation with non integer exponent

Is there a neat way to achieve this without using the pow()-function? Say wanting to calculate 2^(2.5). EDIT: Perhaps pow() is the way to go after all. I was hoping to create a function of my own using only the four common operations to solve it.…
Donkey King
  • 87
  • 1
  • 8
4
votes
0 answers

Spark Weighted Least Squares for Exponential fitting

Is this possible to use Spark WLS module for semivariogram exponential fitting of this form: γ(h) = c0 + c1 (1 - e -h/c2)
EdgeRover
  • 195
  • 1
  • 15
4
votes
3 answers

Java output double numbers in exponential format

I have some double numbers that are outputted with this format: Format.String("%1.4e",doubleNumber); The result is 1.123456e+03. How can I set the number of cipher of exponent for getting this format: 1.123456e+003 I would have always 3 cipher…
michele
  • 26,348
  • 30
  • 111
  • 168
4
votes
7 answers

Computing e^(-j) in C

I need to compute imaginary exponential in C. As far as I know, there is no complex number library in C. It is possible to get e^x with exp(x) of math.h, but how can I compute the value of e^(-i), where i = sqrt(-1)?
Erkan Haspulat
  • 12,032
  • 6
  • 39
  • 45
4
votes
1 answer

Fortran format 1P10E11.3

Does anyone know what this format line means in fortran: FORMAT(1x,F7.0,2x,1P10E11.3) I know the first part is one repetition of float number but I don't understand how many exponential data points are read in the second part and what that P is…
user3780714
  • 545
  • 1
  • 4
  • 5
4
votes
1 answer

Exponential Fitting with Scipy.Optimise Curve_fit not working

I am attempting to use Scipy.Optimise Curve_fit to fit an exponential to some data following the simple example here. The script runs without errors however the fit is terrible. When I look at the output of popt at each step of curve_fit, it does…
DaveB
  • 384
  • 4
  • 14
4
votes
3 answers

How to force exponential number to be print with leading dot in python?

I am trying to print exponential number in python but I need my number to start by dot. Something like : >>>print( "{:+???}".format(1.2345678) ) +.1234e+01
Sigmun
  • 1,002
  • 2
  • 12
  • 23
3
votes
1 answer

Meaning of a big O in an exponent

What does this expression f(n) = 2O(n) mean, in an exact formal manner?
Anatoly Libman
  • 271
  • 2
  • 12
3
votes
1 answer

Element by element exponential of a sparse matrix in R

I have a large sparse matrix (dgCMatrix) in R, and I would like to have the exponential of each element of this matrix. More precisely, I would like to do 1-exp(-x) to each element of the matrix. Unfortunately, when I do this in R, there is a…
3
votes
2 answers

How to redefine the .^ operator in MATLAB?

How can I redefine the exponential function .^ in MATLAB? From: x.^y to: sign(x).*abs(x.^y))
h02h001
  • 167
  • 4
  • 11
3
votes
0 answers

matrix exponential in cvxpy

I am trying to implement the following convex-optimization problem in cvxpy: A = a given matrix of dimension dim x dim B = a given matrix of dimension dim x dim X = cp.variable((dim, dim)) distance = cp.norm(exp(X)-A, 'fro') delta= some…
EmFed
  • 31
  • 2
3
votes
2 answers

Is O(3^n) still written as O(2^n)?

I'm wondering if an algorithm with an exponential worst time complexity, should always have that stated as O(2^n). For example, if I had an algorithm that's operations triple for each addition to the input size, would I write it's time complexity as…