I've been interested in making a community PoE tool that involves calculating the dps of a weapon (in addition to other features) based on the mods present. I've been running into an issue where the result I'm getting is nearly correct, but is off by a tenth of a dps or so whenever I test it. I've double checked my math but don't see anything - can anyone spot what is going wrong? Take this foil as an example:
foil
Here is the math I've been using:
Base Jewelled foil stats
Min damage: 32
Max damage: 60
Attacks per second: 1.6
Stats from mods
Quality: 30%
Added min phys: 16
Added max phys: 30
Increased attack speed: 23%
Total % increased phys: 168%
Calculations
Total min damage = (32 + 16) * (100 + 168 + 30)/100 = 143.04
Total max damage = (60 + 30) * (100 + 168 + 30)/100 = 268.2
Total attacks per second = 1.6 * (100 + 23)/100 = 1.968
Total dps = 1.968 * (143.04 + 268.2)/2 = 404.66016
My result, 404.66 dps, is slightly off of what is shown on the website, which is 404.53 dps (from the image). Any idea where the issue is? I have tried multiple foils off of trade and they all have some sort of error around a couple tenths of dps.
Edit: it is worth noting that I have also tinkered with how the numbers are rounded at different stages of the calculations, and the method that gives the most accurate answer is actually no rounding at all.