using inc instead of +1 in touint
removing unused typedefs in neldermead
saturated arithmetic needs to cast to the right type before doing the addition
use the right type for 2 in cdiff
various strong typing fixes in complex tests