I was looking into a reported bug today regarding AS ships not showing the
proper "max armies you can carry" on the dashboard if the player's kills
is .33, 1.33, 2.33 etc.  To test this out, I used an AS ship and got
kills exclusively through bombing.  At .33 kills displayed, the server
lets the player carry 1 army, but the dashboard display max army capacity
of 0 (for both cow and netrekXP btw).

I went to the vanilla source, and looking at the code, each army bombed
should be worth .02 kills.  However, in practice, something else happens.  At
what seems a 50/50 chance, sometimes an army is worth .20000 kills and
sometimes it is worth .19999 kills (I only checked to 5 decimal places
by modifying the client dashboard to report extra decimal places, but
I assume the 9s go on forever).  The relevant code, in /ntserv/daemonII.c
is:
    j->p_kills += (0.02 * ab);

where j->pkills is defined as a float, and ab is a local integer.  Does
anyone have insight into what is happening here to cause this strange
oscillation?

Getting back to the original issue of the disparity between client and
server army capacity for an AS with .33 kills, the relevant server code,
from /ntserv/daemonII.c is:
            /* XXX */
            if (j->p_ship.s_type == ASSAULT) {
                if (j->p_armies == (int)(j->p_kills * 3.0))
                    continue;

So the function (int)(.33 * 3.0) is returning 1.  I checked this with 5
decimal places to make sure it was indeed .33000 kills, not .33999 kills
as can also happen due to the strangeness mentioned earlier.  In either
case the client would show .33 kills, but in the first case I don't see
why it is rounding up to 1 (.33 * 3.0 = .99 by my book, int should round
that down to 0).  Any thoughts?
Bill