I need help creating an algorithm that outputs a number that is very slightly exponentially increasing.

Let's say I have two sets of numbers each with two variables:

Set 1

X: 15000; Y: 500

Set 2

X: 5; Y: 0.16667

I need an algorithm that will output a number, but when you increase Y, it exponentially grows.

For example, if the number outputted for Set 1 was 200 and then you changed the Y value to 800, but kept the X value the same, it should now output 400. This is just a rough example to get the point across.

I need the algorithm to output the same exact number for any set of numbers (x and y) that is put into it as long as their ratio is equal. i.e: 15000 / 500 = 5 / 0.16667

Would anyone know how I could create an algorithm that does this?


$f(x,y)=e^{\frac{y}{x}}$ should work


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.