I should write a new computer program which includes this computation which I am having trouble with.
I may have several cases, say I have 5 numbers, 0,0.25,0.50,0.75,1 starting from the middle element, in this case 0.50 I should calulate x value where,
MAX_VALUE = 100
x for 0.50 = 0 (since 0.50 is middle element)
x for 0 is MAX_VALUE (positive) (left most)
x for 1 is MAX_VALUE (negative) (right most)
I may have other cases which may have even numbers as well.
Thanks in advance
you need a function $f(x)$ with $f(0)=100=f(1)$ and $f(0.5)=0$. There are lots of functions with this property. For example a linear growth would lead to $f(x)=200|x-0.5|$. Or you can choose something quadratic like $f(x)=400(x-0.5)^2$. Even $f(x)=-100\sin(\pi x) + 100$ would do the job.