MCPcopy Create free account
hub / github.com/coin-or/CppAD / df_direct

Function df_direct

example/multi_thread/multi_newton.cpp:819–826  ·  view source on GitHub ↗

Direct calculation of derivative with same number of floating point operations as for f_eval.

Source from the content-addressed store, hash-verified

817 // Direct calculation of derivative with same number of floating point
818 // operations as for f_eval.
819 double df_direct(double x)
820 { double sum = 0.;
821 size_t i;
822 for(i = 0; i < num_sum_; i++)
823 sum += cos(x);
824
825 return sum / double(num_sum_);
826 }
827
828 // AD calculation of detivative
829 void fun_ad(double x, double& f, double& df)

Callers 1

fun_noFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected