Fastmath and forwarddiff

Is there a straightforward way to combine @fastmath with ForwardDiff? The idea is that I might define a function f(x) using @fastmath and I then want to evaluate f'(x) using ForwardDiff. My naive attempt generates an error.

Can you post your code and the error?

1 Like