Akali's passive not properly triggering

  • Upon reaching 10 AD with runes/masteries the Discipline of Might passive is not properly triggering at level 1.

    Runes I am using:
    -Greater Mark of Scaling Attack Damage x1 = .13 Attack Damage at level 1
    -Greater Mark of Attack Damage x6 = 5.7 Attack Damage
    With masteries:
    -2 points in Brute Force = 3 Attack Damage
    -4 points in Deadliness = .67 Attack Damage at level 1
    .13+5.7+3+.67 = 9.5, which is not technically 10, but the system rounds it to 10. At level 1 Akali starts with 56 Attack Damage, I start with 66, and it appears as 56+10, yet the passive is not proc'ed. This is shown in the screen shots below; 10 bonus Attack Damage is there, yet only Discipline of Force is proc'ed.

    This problem can obviously be fixed by adding another Greater Mark of Attack Damage, but if it shows 10 then I don't see why the passive shouldn't proc.
  • This is an issue with how we display rounding in the game. The game allows you to have fractions of attack damage, but the display will not show fractions and will round numbers. You're correct in that you need to trust in your math for the +AD from runes.
  • Quote:
    <table cellpadding="6" cellspacing="0" border="0" width="100%"> <tr> <td class="alt2" style="border:1px inset; padding:10px;">
    Originally Posted by Xavdidtheshadow View Post
    Hey, Dannamoth, can you help me with the rounding?

    Does the game use the unrounded values but just show us the rounded ones?
    </td></tr></table>
    The game will use the decimal form of numbers in calculations pertaining to game mechanics, ie akali's passive, or when you deal damage.
  • Ooooooooooookay...

    tl;dr This is an issue with rounding (and not with rounding incorrectly). I'm poking design to see if we can come up with a good solution.

    ENGINEERING FACTOIDS AND EXPLANATIONS BELOW

    Greater Runes of Attack Damage do not give 0.95 AD, they give 0.945, and they actually give 0.94499999 AD.

    After accumulating all 6 of those runes, you have 5.6700001 bonus AD.

    Greater Runes of Attack Damage per Level do not give 0.13 AD per level, they give 0.135, and they actually give 0.13500001.

    After adding the 1 rune, you have a cumulative total of 5.8050003 bonus AD.

    The Deadliness mastery does not give 0.17 AD per rank per level, it gives approximately .1667 AD per rank per level, which when multiplied with 4, gives you 0.66680002. Adding that to your cumulative total gives you 6.4718003 bonus AD.

    Brute Force at level 3 gives an exact 3 AD. Accumulating this gives you, wait for it, 9.4717999 AD.

    "But wait!" you say. "Why do the numbers appear as they do if you're rounding correctly?"

    56 + 10 = 66

    56 is generated off of Akali's base AD + 1 level of her AD growth. This is:

    53 + (1 * 3.2) = 56.200001

    66 is generated off of Akali's base AD + her AD modifications. This is:

    56.200001 + 9.4717999 = 65.671799

    10 is generated off of a subtraction between the rounded integral representations of the previous two numbers. This is done so that you don't have strange tooltips like "56 + 9 = 66".

    And so, 56.200001 rounds down to 56, and 65.671799 rounds up to 66, but 9.4717999 < 9.5.

    Obviously this is, well, dumb. You should not have to worry about crazy floating point math like this, and you should be able to trust your tooltips to give you 99% of the picture (there will always be discrepancies). I'm talking with designers to see if we can figure out a long-term solution so this doesn't keep happening with various edge cases.
  • Quote:
    <table cellpadding="6" cellspacing="0" border="0" width="100%"> <tr> <td class="alt2" style="border:1px inset; padding:10px;">
    Originally Posted by Fomorian27 View Post
    Makes sense, but it raises the question of why the numbers are 5.0000011 instead of just being 5.0... Are these numbers generated based on statistics?
    </td></tr></table>
    No. This is a result of the IEEE floating point format. We have 32 bits to describe as many floating point numbers as we can. This is 4294967296 unique numbers, which is a lot, but given that there are infinite rational numbers between any two unique numbers, this means that not every number can be represented exactly.

    It's an extremely broad and complicated subject core to software engineering. I recommend this page as a resource.
  • Quote:
    <table cellpadding="6" cellspacing="0" border="0" width="100%"> <tr> <td class="alt2" style="border:1px inset; padding:10px;">
    Originally Posted by Void2258 View Post
    This is why we should have used base 12 numbers instead of base 10. Stupid fingers.
    </td></tr></table>
    Actually, the counting base has nothing to do with it because we convert everything to base 2 for the calculations anyway.