To exactly replicate the behaviour of the example given in RFC 1071, the accumulator should instead be initialised to normal zero ( 0x0000). This is achieved by initialising the accumulated sum to negative zero ( 0xffff), which makes no difference to the final result except in the case where nothing is added to it. In the interests of consistency, the implementations described here prefer normal zero over negative zero in all cases (even where the data is all zeros). It would not feasible for an incremental algorithm to replicate this idiosyncrasy.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |