Questions tagged [exponent]

Exponentiation is a mathematical operation, written as b raised to the power of n, involving two numbers, the base b and the exponent (or power) n.

Exponentiation refers to the mathematical operation involving two numbers, one is a base and another is an exponent. It is repeated multiplication. To calculate 53 you have to multiply the number 5 (base) by itself 3 times (exponent).

588 questions
-1
votes
1 answer

python-import csv with decimal value

I have this csv file I want to import to python. The first row looks like this 9.98E-01 7.07E+00 2.43E+00 4.63E+00 4.16E+00 -3.22E+00 2.95E-01 How would I convert these values to python and keep their structure(float/…
user02
  • 281
  • 3
  • 10
-1
votes
3 answers

Using a negative exponent

This is the problem I'm working on This is my code p = int(input('Enter the amount of the loan: ')) r = float(input('Enter the interest rate: ')) d = int(input('Enter the length of loan in months: ')) if p > 0 and r > 0 and d > 0: m_payment =…
Jeremy
  • 11
  • 2
-1
votes
2 answers

Why does NumPy.exp show a different result than exp in C

I am converting some Python code to C code. Below Python NumPy exp on complex number outputs (6.12323399574e-17-1j) for k=1, l=4. numpy.exp(-2.0*1j*np.pi*k/l) I convert it to C code like below. But the output is 1.000000. #include…
nad
  • 2,640
  • 11
  • 55
  • 96
-1
votes
3 answers

Weird python power module result

According to these answers there is not difference between pow(a,b) and a**b. However, math.pow(a,b) returns a float value. Now, when running the following python code something strange happens: >>>import…
Squeek
  • 33
  • 7
-1
votes
1 answer

Decrypt data using RSA algorithm in Android

i am trying to encrypt data using RSA encryption algorithm in my android app. i am able to encrypt data but whenever i am going to decrypt that encrypted data then i am getting Exception. i have tried in google and also tried by apply all the…
Ajay
  • 1,189
  • 1
  • 12
  • 28
-1
votes
5 answers

Math.pow wont work for me. Dont know why. Says cannot find symbol class.Math

My code thus far : I dont know why in the world it doesnt see the Math.pow or let me do the exponents. Says that it cannot find class Math symbol. Location : Package java.util import java.util.Math; class Test { public static void…
Monte Dreyer
  • 13
  • 1
  • 4
-1
votes
2 answers

Calculate Exponential Decay Value In Ruby

It occurred to me today that I have forgotten almost all of my high school math, so I need some assistance working out some basic math in Ruby. Essentially, I have a set of values from 1 to 10. Right now, I simply multiply them by 10 to get a…
Cheyne
  • 1,964
  • 4
  • 27
  • 43
-1
votes
6 answers

Sum of 2^x using elements of a list as exponents

Given a list containing integers : >>> print mylist [0, 1, 2] Can I calculate the sum of 2^0 + 2^1 + 2^2 ? the base number (2) is fixed, it does not change, I'm just using the elements of list as exponents related doubts : Is a list suitable for…
lese
  • 539
  • 1
  • 5
  • 24
-1
votes
3 answers

c++ trying to figure out logarithms calculations

So if I am understanding c++ and logarithms correctly. Something like this should give me the base that I am looking for? I am having some issues, but think that this way is a correct start. #include using namespace std; int…
luckyging3r
  • 3,047
  • 3
  • 18
  • 37
-1
votes
1 answer

Getting polynomial exponents in java

I am trying to get the exponents of a polynomial in java. I found something similar here How to extract polynomial coefficients in java? but I can't seem to be able to modify that for my needs, the argument of the .split() method. I tried…
staynless
  • 86
  • 8
-1
votes
2 answers

Getting the exponent of a floating number in C

So I am trying to return the exponent value for f. If x is infinity or NaN I need to return Tmax. f is to be interpreted as the bit-level representations of single-precision floating point values and yes I mean to pass in an unsigned variable. I…
Shaw
  • 169
  • 1
  • 3
  • 12
-1
votes
2 answers

Algorithmic or Mathematical way of separating decimal from floating?

Is there any mathematical or algorithmic way of dividing a floating point number into two parts (before and after) the point. Example: number=456.789 before=456 after=0.789 I don't want any code because I can do this in any programming language. I…
zindarod
  • 6,328
  • 3
  • 30
  • 58
-1
votes
5 answers

How to determine 2^x = 64

I know the answer to this question is 6... but I am wondering what the formula is to figure this out. I will always need to solve for x in this scenario. TIA
Crobzilla
  • 4,891
  • 4
  • 17
  • 11
-1
votes
3 answers

Find unknown exponent in Python with very large numbers

I am attempting to find d in Python, such that (2 ** d) mod n = s2 Where n =…
LonelyWebCrawler
  • 2,866
  • 4
  • 37
  • 57
-2
votes
2 answers

Having trouble writing an equation with scientific notation and exponents in Python

I am having some trouble writing this equation in Python and having it produce correct results: y = 2.95710^-7 * x^4 – 2.34310^-5 * x^3 – 1.67*10^-4 * x^2 + 0.04938 * x – 1.083. I have tried the following code: y = 0.0000002957*x**4 -…