[ntp:questions] Re: an example of a negative RootDelay, please...
David L. Mills
mills at udel.edu
Sat Aug 9 05:26:45 UTC 2003
You need to understand how twos-complement, fixed-point arithmetic
works. The best reference is ../include/ntp_fp.h, which is in the NTP
distribution. You should hunker down and really understand how that
works. It is a worthwhile investment in technology.
>>The root delay format is described on p. 51 of RFC-1305 as I'm sure you
> yes, i have...
>>As in almost everything Internet, this and other NTP packet
>>variables are in twos-complement representation and big-endian network
>>byte order. That completely describes both positive and negative values
>>except for scaling. The decimal point for the root delay and root
>>dispersion is between bits 15 and 16. Once you understand how
>>twos-complement arithmetic works, the answer to your question is obvious.
> i know 2-complement arithmetic for integers or floating-point numbers, but
> not in fixed point arithmetic... let me take some example: -1,1 in
> RootDelay format for integer part we got '255 255' (in byte) but for
> fractional part? something like '128 0'? (maybe it 0,2..) or something
> else? i try search something but i can't find some stuff that let me
> understand... you may help perhaps....
>>Negative values for roundtrip delay and by implication root delay are in
>>principle possible, but very rare.
> thus they not impossible, so i have to understand how they work...
> bye and thanks again
More information about the questions