gonum/optimize — pull request #20 by vladimir-ch (2014-12-11 05:42:54+00:00)
Title: Put NaNs in F or Gradient only if X has changed.

local.go:evaluate() puts unconditionally a NaN in location.F if
GradientEval is requested, or into location.Gradient if FunctionEval is
requested. This may cause some issues especially in Recorders.
Therefore, use NaNs only if location.X and xNext are different.

Fixes #11

This works, but is it good enough?