Shannon V. OKeets
Posts: 21870
Joined: 5/19/2005 From: Honolulu, Hawaii Status: offline

quote:
ORIGINAL: ullern quote:
ORIGINAL: Shannon V. OKeets quote:
ORIGINAL: Cheesehead My apologies if this has been addressed, but this question has been bantied about on the WiF list and I was wondering how Steve plans to handle it. How will an odd numbered reorg value be interpreted when rounding up for defensive HQ support? The math wizards out there have made the case that correctly rounding up means that Mao (for example) only gives you a 1 modifier unless there is a +.5 offensive mod that he can reduce. For example: Japan makes a simple 51 attack with no flips, no offensive HQ support or any aother modifiers at +10 on the 2D10 system. According to the mathematicians, Mao throwing in defensive HQ support would only reduce the attack to +9 since rounding "up" in this case goes from 1.5 "up" to 1. This is counterintuitive to many of us, although I acknowledge that it is mathematically correct. I've also seen this rounding issue brought up in air combat. How will MWiF handle this? Thanks John The pertinent lines of code follow. DRM is a cumulative Extended (real) value for all die roll modifiers, including HQ bonuses. The first two lines of code convert it into an integer value by calling the Round function given below. ======================== if OptRules.TwoD10LandCRT then DieRollMod := Range(Util.Round(DRM), 21, 21) else DieRollMod := Util.Round(DRM); ======================== function Round(const E: Extended): Longint; begin if Frac(E) = 0.5 then Result := Trunc(E) + 1 else if Frac(E) = 0.5 then Result := Trunc(E)  1 else Result := System.Round(E); end; ======================== Just in case you can't read code, this says that when the fractional part is 1/2, convert the value to 1. If it is +1/2, convert it to +1. At all other times convert the real value to the closest integer number. This is no case of math wizard. It's plain rules. There is no such thing as a common math rules in WIF. WIF defines it's own rounding laws: quote:
ORIGINAL: WIF RAW 7 AUG 2004 2.6 Fractions These rules frequently require a calculation that produces a fraction. When you have to do this, round to the nearest whole number, rounding halves up. Example: Germany has 21 production points. Her production multiple is 1.25, so she has 26.25 build points. This rounds to 26 points. Next year her production multiple increases to 1.5, so she has 31.5 build points. This rounds to 32. Rounding a negative number up moves you closer to zero. For example, if the fraction is 1.5, it rounds to 1. Round off a number immediately before:  calculating an odds ratio; or
 looking the number up in a table; or
 comparing it to a dice roll or to a fixed value; or
 spending oil (see 13.5.1) or build points.
Example: In an attack, you have 3 units attacking across a river. Their total strength is 17, which halves to 8.5. In addition, you add in 8.5 factors of shore bombardment. You also commit a CV with an air component of 5 as ground support. Its tactical factors are 2.5. Your total attack strength is 19.5. As you are about to calculate an odds ratio, you round it to the nearest whole number ~ 20. I belive this means Steve have to change his round of method. This is trivial to change (less than a minute), so that is not an issue. I seem to recall there is something about rounding in the favor of the defender, though where I read in the rules than eludes me at the moment.
_____________________________
Steve Perfection is an elusive goal.
