Jump to content

Need some help understanding this bit


Guest Atari007

Recommended Posts

Hello,

I was looking into the system of distributing arena ratings, when I saw this method used for calculating the chance of winning:

1.0f/(1.0f+exp(log(10.0f)*(float)((float)enemy_rating - (float)own_rating)/400.0f));

This doesn't do the same as what's told on wowwiki: http://www.wowwiki.com/Arena_PvP_system#Arena_rating_system (I don't know if that's a reliable source though).

If it would need to do the same as on wowwiki, we'd need to used "ln" (logarithm to the base e) instead of "log" (logarithm to the base 10).

It would be:

1.0f/(1.0f+exp(ln(10.0f)*(float)((float)enemy_rating - (float)own_rating)/400.0f));

I haven't tried to understand the ELO system yet, but if someone could explain me where I'm wrong, I'd much appreciate that :)

Thanks,

Atari007

Link to comment
Share on other sites

in C++ log seems to mean (surprising, because this is what it should, log) and not log_10

I don't really know why (especially germans) use ln for log, but log means log_e in most literature ;)

That would explain :) We, Belgians, use ln for base e and log for base 10. I thought it was common around the world.

Link to comment
Share on other sites

well, I didn't translate from english, and don't know enough about latin, but naturalis seems to be a valid latin-word ;)

But I see the point, logarithmus is the german word, and it's connection to latin was stupid by me, as this word originated from greek, but anyhow, the combination "logarithmus naturalis" (german, latin) is not uncommon in german ^^ (infact I wrote this from my school memories)

UNfortunately wikipedia doesn't link copies of the original works, because it seems that logarithms have been used for quite some time, and the first naming similar to logarithm was 1614 by JohnNapier - this was of a time when science was done in latin, and so he seems to named logarithm "Logarithmorum".

So yes, you are right, it is kind of Harry Potter approach (take one word, and add one latin word) - I never had thought of this being a mixup of german and latin before :P

Link to comment
Share on other sites

It was not criticism, I do the same :D

Most of the time harry potter translations are nearly correct!

I have some bad memories from latin in school too.

I just loved the "it is some thing about intellectual touch I think" like "latin is a for crazy people" ^^ (which is true)

Link to comment
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use