From eac79b6d2e0a4feeccf7e5936cd972fdc4a74ac7 Mon Sep 17 00:00:00 2001 From: Benoit Jacob Date: Sat, 9 May 2009 03:41:17 +0000 Subject: CREDIT Hauke Heibel, fix MSVC warnings --- unsupported/test/autodiff.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'unsupported/test/autodiff.cpp') diff --git a/unsupported/test/autodiff.cpp b/unsupported/test/autodiff.cpp index 71ae4cdc4..8d0986125 100644 --- a/unsupported/test/autodiff.cpp +++ b/unsupported/test/autodiff.cpp @@ -30,7 +30,7 @@ EIGEN_DONT_INLINE Scalar foo(const Scalar& x, const Scalar& y) { // return x+std::sin(y); EIGEN_ASM_COMMENT("mybegin"); - return x*2 - std::pow(x,2) + 2*std::sqrt(y*y) - 4 * std::sin(x) + 2 * std::cos(y) - std::exp(-0.5*x*x); + return static_cast(x*2 - std::pow(x,2) + 2*std::sqrt(y*y) - 4 * std::sin(x) + 2 * std::cos(y) - std::exp(-0.5*x*x)); // return y/x;// - y*2; EIGEN_ASM_COMMENT("myend"); } @@ -136,8 +136,6 @@ template void adolc_forward_jacobian(const Func& f) void test_autodiff() { - std::sqrt(3); - std::sin(3); std::cerr << foo(1,2) << "\n"; AutoDiffScalar ax(1,Vector2f::UnitX()); AutoDiffScalar ay(2,Vector2f::UnitY()); -- cgit v1.2.3