[Bug libstdc++/32822] New: More Hash Document Errors
chalathip at gmail dot com
gcc-bugzilla@gcc.gnu.org
Thu Jul 19 14:22:00 GMT 2007
+++ This bug was initially created as a clone of Bug #32819 +++
from libstdc++-v3/docs/html/ext/pb_ds/hash_based_containers.html
In the Bug #32819, I report 2 errors. But I found one more bug.
Section : Hash Table Design - Hash Policies - Ranged-Hash Functions
Original text :
Now assume that s is the string representation of a of a long DNA sequence (and
so S = {'A', 'C', 'G', 'T'}). In this case, scanning the entire string might be
prohibitively expensive. A possible alternative might be to use only the first
k characters of the string, where
k^|S| ≥ m ---------- (1)
...
requiring scanning over only
k = log4( m ) ---------- (2)
characters.
My suggestion:
In my humble opinion, I think that the first equation should be changed to
|S|^k ≥ m
Otherwise, the second equation should be changed to
k=m^(1/4)
Anyway if the form of the second equation is changed from
k = xxx
to
k = integral_ceiling (xxx)
or something looks like
k= [xxx] ,(but the brackets should have only their upper halves ),
it might be a little more accurate.
Best regards,
Chalathip Thumkanon.
--
Summary: More Hash Document Errors
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libstdc++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: chalathip at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32822
More information about the Gcc-bugs
mailing list