Fix typo in definition of f3 in powell example (x4 -> x3).
- This was reported as issue #307 by versatran01.
Change-Id: I2c8bbd3466d46b550f81fdadb8b1f4e23b858162
diff --git a/examples/powell.cc b/examples/powell.cc
index e98f12f..614c9c6 100644
--- a/examples/powell.cc
+++ b/examples/powell.cc
@@ -77,10 +77,10 @@
struct F3 {
template <typename T> bool operator()(const T* const x2,
- const T* const x4,
+ const T* const x3,
T* residual) const {
// f3 = (x2 - 2 x3)^2
- residual[0] = (x2[0] - 2.0 * x4[0]) * (x2[0] - 2.0 * x4[0]);
+ residual[0] = (x2[0] - 2.0 * x3[0]) * (x2[0] - 2.0 * x3[0]);
return true;
}
};