'RFC 3550 A.8 Jitter calculation not match

In RFC 3550 A.8 Estimating the Interarrival Jitter.

Save jitter in double precesion:

  int transit = arrival - r->ts;
  int d = transit - s->transit;
  s->transit = transit;
  if (d < 0) d = -d;
  s->jitter += (1./16.) * ((double)d - s->jitter);
  rr->jitter = (u_int32) s->jitter;

Save jitter in integer:

  int transit = arrival - r->ts;
  int d = transit - s->transit;
  s->transit = transit;
  if (d < 0) d = -d;
  s->jitter += d - ((s->jitter + 8) >> 4);
  rr->jitter = s->jitter >> 4;

If d == 16, then floating point give me 1, while the interger part give me 0?

Thanks



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source