Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

over 4 years ago

Language

C++

Compiler

clang HEAD 12.0.0 (https://github.com/llvm/llvm-project.git 1c19900f9417bd0b832c1cb70863b2439a18647f)

Options
Warnings
Boost 1.73.0
C++17
no pedantic

Author

anonymous

over 4 years ago

advector.hpp
math_traits.hpp
adgvector.hpp
detail.hpp
test_advector.hpp

$ clang++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.73.0/clang-head/include -std=c++17
テストの実行
テストの実行完了

f(x, y) = exp(sin(x + cos(y))) + xのボトムアップ型自動微分の実行(x = 2, y = 4)
f(2, 4)=4.65095
fx(2, 4)=1.59
fy(2, 4)=0.446511

f(x, y) = cos(x + y)の自動微分の実行(x = 2, y = 4)
f(2, 4)=0.96017
fx(2, 4)=0.279415
fy(2, 4)=0.279415
fxy(2, 4)=-0.96017
fxx(2, 4)=-0.96017
fxxy(2, 4)=-0.279415
fxyy(2, 4)=-0.279415
fxxyy(2, 4)=0.96017

Exit Code:
0