1
$\begingroup$

Probably a simple question, but my math is a bit rusty... I need a function which looks similar to logarithmic (fast rise at the beginning, then slows down). $f(0) = 0$, $f(b) = a$ ($a = 100$, $b = 2500$ but should be changeable, in between $500$-$5000$)

I don't need a horizontal asymptote because I'll cut off the values when $x$ reaches $b$.

Simply, I need it for my site for calculating a score as a percentage based on number of voters, which rises in a logarithmic fashion until $x$ reaches certain number ($500$-$5000$) and then it bumps the $100$ percent value. (thus giving new users instant gratification, and preventing score spamming for those with more votes).

I played with logarithmic functions but it's hard for me to get something which can be easily parametrized to easily change the parameter $b$ while keeping the flow.

Any ideas?

  • 0
    Basically what I meant is to have function be close to 100 on y-axis when x approaches a. It doesn't have to reach 100 precisely in a, because I was cutting it off (accuracy wasn't an issue)2013-05-13

3 Answers 3

0

Just in case someone wonders, I used a work-around -- tables of a couple of key values, while interpolating points in between. But thanks for your answers, actually they almost did the trick but tables are way more fitting for my purpose which is more of a numerical nature :)

2

How about $ \frac{100}{\ln{2501}}\ln{(x+1)}$?

  • 0
    i.e. $\frac{a}{\ln(b+1)}\ln(x+1)$2012-08-25
0

Perhaps $a\sqrt{\frac{x}{b}}$ (however it "slows down" much slower than a logarithmic function...)?