thanks for the help. Here's what I got (thanks to the help of Jake L Price)
The score changed slightly after the initial question (with 120,000 being the top of the scale), however, the logic for the algorithm should remain unchanged. As you can see below, we used log * 10 to get an acceptable low number. Then we multiply this by a number that provides 120,000 upper levels of 100.
echo $this->rank($score); public function rank($score) {
Now coming back
$scores = [0.15,1,7,12,236.4,1211,17899.70, 120000]; foreach ($scores as $score){ echo "Score: " . $score . ", Rank: " . $this->rank($score) . "</br>"; }
Output:
Score: 0.15, Rank: 2.896627883404 Score: 1, Rank: 16.449583579206 Score: 7, Rank: 30.351094421044 Score: 12, Rank: 34.201665683178 Score: 236.4, Rank: 55.495096060882 Score: 1211, Rank: 67.166020848577 Score: 17899.7, Rank: 86.407125230156 Score: 120000, Rank: 100
source share