Welcome to WebmasterWorld Guest from 18.104.22.168
Forum Moderators: phranque
I need to give each number an accuracy rating, 0 would be 0% accurate, 30 would be 100% accurate.
as a number gets closer to 30 the accuracy should increase exponentially, for example I would want the number 20 to be around 80% accurate.
I know I need some sort of curve to do this but am unsure how to create the function, can anyone help me out?
How about using a square root and converting it into a percentage?
sqrt(30) = 5.47722558, so if $x is the number you are trying to convert you could do.
sqrt($x) / 5.47722558 * 100
This would put 20 at 82%
Edit: this would put 1 at 18% and 4 at 32% and 10 at 58% - I'm not sure I've got what you are trying to achieve the right way around here..?