Skip to content
Snippets Groups Projects
Commit 6b5d17d1 authored by Sander, Oliver's avatar Sander, Oliver
Browse files

Fix bug in method RealTuple::log

Calling log(a,b) returned a-b instead of b-a.

Also, enable unit tests for the RealTuple class.  The current test
will not trigger the bug in the log method: that will come shortly.

Finally, this commit is the first that mentions its user-facing
changes in the newly introduced CHANGELOG.md file.
parent 565b7f77
No related branches found
No related tags found
1 merge request!93Enable more tests for the various TargetSpace classes
# Master
- Fix bug in the `RealTuple::log` method: Calling `log(a,b)`returned `a-b`
instead of `b-a`.
......@@ -110,10 +110,11 @@ public:
}
/** \brief The logarithmic map
* Simply the difference vector for RealTuple
*
* \result A vector in the tangent space of a, viz: b-a
* */
static auto log(const RealTuple& a, const RealTuple& b) {
return a.data_ - b.data_;
return b.data_ - a.data_;
}
#if ADOLC_ADOUBLE_H
......
......@@ -355,8 +355,9 @@ void test()
int main() try
{
// test<RealTuple<double,1> >();
// test<RealTuple<double,3> >();
// Test the RealTuple class
test<RealTuple<double,1> >();
test<RealTuple<double,3> >();
test<UnitVector<double,2> >();
test<UnitVector<double,3> >();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment