Fixed secant function so that if x+dx is the solution, it still works
Better ancillaries for R161

Signed-off-by: Ian Bell <ian.h.bell@gmail.com>