0

How would one write a function to convert a point in a linear range to a point in an exponential or logarithmic range?

i.e. Input -> Output

0.0 -> 0.00
0.2 -> 0.50 (Estimate)
0.5 -> 0.80 (Estimate)
0.9 -> 0.95 (Estimate)
1.0 -> 1.00

I am not familiar with most math notation (hence trawling posts for hours and still being confused) so if someone is able to answer using only plus, minus, divide, multiply, pow, that would be great!

kohloth
  • 101

1 Answers1

0

Just figured it out by cracking open a spreadsheet and playing around.

The formula for this is:

output = (input * (10 * (input * 10))) / 100

Given an input of .5, the output would actually be .25.

.25 = (.5 * (10 * (.5 * 10))) / 100

When run against a range of numbers, we get the following:

0.0 -> 0.00
0.1 -> 0.01
0.2 -> 0.04
0.3 -> 0.09
0.4 -> 0.16
0.5 -> 0.25
0.6 -> 0.36
0.7 -> 0.49
0.8 -> 0.64
0.9 -> 0.81
1.0 -> 1.00
kohloth
  • 101