basically i need the output as follows if

a = 50 and b = 1 output = 50

a = 50 and b = 2 output = 25

a = 50 and b = 3 output = 12.5

a = 50 and b = 4 output = 6.25

what formula would i use i have tried exponential " ^ " but it seems to be broken

basically i need the output as follows if

a = 50 and b = 1 output = 50

a = 50 and b = 2 output = 25

a = 50 and b = 3 output = 12.5

a = 50 and b = 4 output = 6.25

what formula would i use i have tried exponential " ^ " but it seems to be broken

3 Likes

So just a/b+1?

1 Like

To divide use a/b

To Multiply use a*b

From what the title says the equation would look like: (a/2)*b

But from the data you mentioned it looks like the first row, you just did a/b which is 50/1. The second row looks like you died the same thing with b being 2 and you got 25. But the second one doesn’t seem to follow a/b and I can’t really figure out what you did. If a=50 and b=3, and the outcome is 12.5, I can’t really see any equation that you mentioned to get the answer.

I can’t find an equation that makes all of the following true and instead found a seperate equation for each one.

2 Likes

@cailem02

(A/2)*B , but this doesn’t follow the numbers you have provided, which are exponential. You are asking for two different things here with the carrot symbol ‘^’ and the title.

50/1= 50

50/2= 25

50/4= 12.5

50/8= 6.25

etc.

Now, for the syntax error of the carrot:

**Math.pow(x,y)**

this will return x raised to the y power

For example: *Math.pow(4,2)* will evaluate to *16*

1 Like

so i almost have the formula a/(2*b) but if b = 1 it will output 25,12.5,6.25… but i need the first value to equal 50

2 Likes

i know the memes but if u have a huge website that dies cause of it that’s just sad all u have to do is hardcode an exception

1 Like

nvm i got it working i had it start at 0 (yes it is set to divide by 0) but i blocked the dividing and set it to 50

2 Likes

You can’t divide by zero lol, it gives you a vertical slope or a horizontal slope in graphing and if you divide something by zero on a calculator it says “error”

Dividing by zero is possible, but it defies all laws of physics and by doing so would make everything a lie, which is why it is made impossible and calculators hide the truth.

Dividing by zero makes a number **undefined**.

It is honestly useless, as nobody knows what its actual value is.