summaryrefslogtreecommitdiff
path: root/libstdc++-v3
diff options
context:
space:
mode:
authorPaolo Carlini <paolo.carlini@oracle.com>2014-08-13 11:56:45 +0000
committerPaolo Carlini <paolo@gcc.gnu.org>2014-08-13 11:56:45 +0000
commit429e4fdebf1aa0b14a39ac03c71becfd8d0d5f56 (patch)
treea2fdf4f6eb3099bb83ad225a86127488ebe84a25 /libstdc++-v3
parenta3ee88517c7ecef0f29c7af15af31db5dd18d451 (diff)
downloadgcc-429e4fdebf1aa0b14a39ac03c71becfd8d0d5f56.tar.gz
2014-08-13 Paolo Carlini <paolo.carlini@oracle.com>
* Fix thinko in the last commit. From-SVN: r213908
Diffstat (limited to 'libstdc++-v3')
-rw-r--r--libstdc++-v3/ChangeLog4
-rw-r--r--libstdc++-v3/include/ext/random.tcc2
2 files changed, 5 insertions, 1 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 0f51eb493cf..411bb1565f7 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,5 +1,9 @@
2014-08-13 Paolo Carlini <paolo.carlini@oracle.com>
+ * Fix thinko in the last commit.
+
+2014-08-13 Paolo Carlini <paolo.carlini@oracle.com>
+
PR libstdc++/62118
* include/ext/random.tcc (uniform_on_sphere_helper<2, _RealType>::
operator()): Use std::hypot only when _GLIBCXX_USE_C99_MATH_TR1.
diff --git a/libstdc++-v3/include/ext/random.tcc b/libstdc++-v3/include/ext/random.tcc
index 9aef359adc9..88ce8218e8d 100644
--- a/libstdc++-v3/include/ext/random.tcc
+++ b/libstdc++-v3/include/ext/random.tcc
@@ -1611,7 +1611,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
// accurate.
auto __norm = std::hypot(__ret[0], __ret[1]);
#else
- auto __norm = std::sqrt(__ret[0] * __ret[0] + __ret[1] * __ret[1]);
+ auto __norm = std::sqrt(__sq);
#endif
__ret[0] /= __norm;
__ret[1] /= __norm;