2014-08-13 Paolo Carlini <paolo.carlini@oracle.com>
authorpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 13 Aug 2014 11:56:45 +0000 (11:56 +0000)
committerpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 13 Aug 2014 11:56:45 +0000 (11:56 +0000)
* Fix thinko in the last commit.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@213908 138bc75d-0d04-0410-961f-82ee72b054a4

libstdc++-v3/ChangeLog
libstdc++-v3/include/ext/random.tcc

index 0f51eb4..411bb15 100644 (file)
@@ -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.
index 9aef359..88ce821 100644 (file)
@@ -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;