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
0
votes
6 answers

How to use a Caret "^" in C++ for Exponentiation

I am currently rewriting MATLAB code into C++ code. To have the ability to raise "a" to the power of "b" just by typing "a^b" would make my life so much easier as this is how much of the original code was written in MATLAB. Is there a way to do…
Jordan
  • 305
  • 3
  • 13
0
votes
1 answer

Converting exponents to integers in Bash

I want to convert some timestamps in a text file from exponents to integers. The problem is that in the file there are already columns that are decimal numbers and those I don't want to change. I found this thread where the OP has a very similar…
ljnissen
  • 139
  • 1
  • 12
0
votes
0 answers

How do I use transform and conquer to simplify this algorithm?

I am aware that there are three ways transform and conquer can be used to simplify a problem. I'm trying to simplify the code of this one to become more efficient. The thing is, it's already in log n runtime. I was wondering how I could possibly…
0
votes
3 answers

How to sum exponential decay rate based on indexed values

I need to calculate the sum of a constant raised to a power based upon an index. For example if my constant is a rate .5 and the index is 4, I want to sum .5^1+.5^2+.5^3+.5^4 and assign this sum to an object. So my function would initiate the…
RayR
  • 57
  • 1
  • 9
0
votes
1 answer

determine exponent or subscript by position via Y axis for a math equation in kineticjs

can someone please help write a function in KineticJS to determine math object position. I.e. determine if a number 2 is the squared index or just a 2. the positions of the objects are taken using the x-axis (horizontal position with 0 furthest to…
0
votes
1 answer

Raising input numbers to a power; repeating words; entering words

import java.util.*; import javax.swing.*; public class ZhangIDK { public static void main (String[] args) { average (1, 2, 3, 4, 5, 6, 7); least (1, 2, 3, 4, 5); Scanner sc = new Scanner (System.in); …
Sarah
  • 25
  • 7
0
votes
3 answers

Raising a number to a power; Repeating words

import java.util.*; import javax.swing.*; public class ZhangIDK { public static void main (String[] args) { Scanner sc = new Scanner (System.in); System.out.println ("Please enter a number"); int h = sc.nextInt(); …
Sarah
  • 25
  • 7
0
votes
1 answer

Unpacking Exponent factors table multiplied packed value back into original values

I have this poker card game where a possible 13 card ranks stored as [0 to 12]. Each hand which holds 5 cards which have 13 possible card ranks. The final value is a identifier which begins from the exponent 13⁵ (to power of 5). Which stores what…
SSpoke
  • 5,656
  • 10
  • 72
  • 124
0
votes
6 answers

How is the 'e--' expression used in this simple exponent example?

I understand every cog in this code with the exception of one part: the "e--;" within the While loop. Can anybody explain its importance to me? public class Power { public static void Main() { int e; int result; …
0
votes
2 answers

What does fractional power of number mean

I have following query in my mind for many years.I know it sounds stupid and will delete if people don't like it. I know that 2^3 means that multiply 2 three times,3^-2 means multiply (1/3) two times.What does 2^(0.22) means. multiply 2 how many…
Naseer
  • 4,041
  • 9
  • 36
  • 72
0
votes
1 answer

Translating formula from excel to java

I'd like to translate these formula in java: =100*((0.1/G10)+1)*EXP(-0.1/G10) Where my G10 is my spacing1. I did it these way: Double rqd1, rqd2, rqd3; rqd1 = (0.1 / spacing1 + 1) * 100; rqd2 = Math.exp (-0.1 / spacing1); rqd3 = rqd1 * rqd2; rqd3…
luwionline
  • 186
  • 2
  • 12
0
votes
1 answer

Using Exponents to Maintain a Constant Ratio?

So here's my problem: Currently I'm developing a primitive light system for a game. The stage is overlayed with a black mask to represent 'darkness,' its alpha is then adjusted from 0 (brightest, invisible) to 1 (total darkness, opaque.) As the…
0
votes
2 answers

How to handle this formatted Numbers "XYe+02"

I parse an xml-document with dom, which includes tags like this: 0 Now I saved the Number as a String. How can I save it as a double, so that I can use the number for further calculations? How does this…
progNewbie
  • 4,362
  • 9
  • 48
  • 107
0
votes
0 answers

Why does the following exponent fail in Fortran?

I am using Fortran 77, the g77 compiler. I have the following. program title implicit none real*4 x,y y=2 x = (y-4)**.7 end program However this doesn't seem to be working. If I do: -2^0.7 it works, but not if I do (-2)**.7. Why is that? I only…
JXS832
  • 37
  • 1
  • 8
0
votes
1 answer

What does this function do? Something to do with clamping values?

I found this function somewhere, quite a while ago. I do not exactly know what it is doing. I use it to manipulate a simplex noise output (with greyscale values between 0 and 255), but would like to understand it better. int ExponentFilter(int…
NeomerArcana
  • 1,978
  • 3
  • 23
  • 50