From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.66.220.163 with SMTP id px3mr539303pac.38.1383177791632; Wed, 30 Oct 2013 17:03:11 -0700 (PDT) X-Received: by 10.182.44.198 with SMTP id g6mr231obm.35.1383177791448; Wed, 30 Oct 2013 17:03:11 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!news.linkpendium.com!news.linkpendium.com!news.snarked.org!newsfeed.news.ucla.edu!usenet.stanford.edu!z6no451473pbz.1!news-out.google.com!9ni1910qaf.0!nntp.google.com!o2no11003749qas.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Wed, 30 Oct 2013 17:03:11 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=66.126.103.122; posting-account=RxNzCgoAAACA5KmgtFQuaU-WaH7rjnAO NNTP-Posting-Host: 66.126.103.122 References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <87a31163-91a2-471a-9b98-8f5b1414037e@googlegroups.com> Subject: Re: FNV-1 From: Adam Beneschan Injection-Date: Thu, 31 Oct 2013 00:03:11 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Xref: news.eternal-september.org comp.lang.ada:17562 Date: 2013-10-30T17:03:11-07:00 List-Id: On Wednesday, October 30, 2013 4:31:39 PM UTC-7, sbelm...@gmail.com wrote: > subtype FNV_Offset_Type is FNV_Hash_Type range 1 .. FNV_Hash_Type'Last= ; > K_Offset : constant :=3D (case FNV_Offset_Type'Size is > when 32 =3D> Offset_32,=20 > when 64 =3D> Offset_64,=20 > when 128 =3D> Offset_128, > when 256 =3D> Offset_256, > when 512 =3D> Offset_512, > when 1024 =3D> Offset_1024, > when others =3D> 0); I'd worry about whether this is correct. The Implementation Advice in 13.3= (55) says about 'Size: "The Size (if not specified) of a static discrete or fixed point subtype sh= ould be the number of bits needed to represent each value belonging to the = subtype using an unbiased representation, leaving space for a sign bit only= if the subtype contains negative values." Since FNV_Offset_Subtype doesn't have negative values, this would make it s= eem that FNV_Offset_Type'Size is more likely to be 31, 63, 127, etc., inste= ad of 32, 64, 128, etc., if the Implementation Advice is followed. Or it c= ould be something totally different depending on how FNV_Hash_Type'Last is = defined. Those would play havoc with the definition of K_Offset. I'm not = sure how to fix this portably. -- Adam =20