libstdc++: Use double for unordered container load factors [PR 96958]
authorJonathan Wakely <jwakely@redhat.com>
Fri, 30 Oct 2020 15:14:33 +0000 (15:14 +0000)
committerJonathan Wakely <jwakely@redhat.com>
Fri, 30 Oct 2020 20:58:08 +0000 (20:58 +0000)
commita1343e5c74093124d7fbce6052d838f47a8eeb20
treee97bbf1e90e45518d94fd278478cf60bde60d08c
parentd1e5d82af819025df9d9a81e8c591690e299924a
libstdc++: Use double for unordered container load factors [PR 96958]

These calculations were changed to use long double nearly ten years ago
in order to get more precision than float:
https://gcc.gnu.org/pipermail/libstdc++/2011-September/036420.html

However, double should be sufficient, whlie being potentially faster
than long double, and not requiring soft FP calculations for targets
without native long double support.

libstdc++-v3/ChangeLog:

PR libstdc++/96958
* include/bits/hashtable_policy.h (_Prime_rehash_policy)
(_Power2_rehash_policy): Use double instead of long double.
libstdc++-v3/include/bits/hashtable_policy.h