anchor.diff:              (fun t ->
                   let i = 
                       match Array.tryFindIndexBack (fun xs -> xs <= t) (x.InternalValues) with 
  -                    | Some x -> x 
  +                    | Some z -> if t = Seq.last x then h.Length-1 else z 
                       | None   -> failwith "The x-value is not part of the section used to estimate the spline coefficients, thus a monotone function progression can not be guaranteed"
                   evalAt i t
                   )
   
           /// second derivative at amplitudes a and curvatures c with x values x
           let initEvalSndDerivativeAt (x:Vector<float>) (a:Vector<float>) (c:Vector<float>) =
  -
               let n = x.Length
   
               //define interval stepwidths
  
positive.code:             (fun t ->
                  let i = 
                      match Array.tryFindIndexBack (fun xs -> xs <= t) (x.InternalValues) with 
                      | Some x -> x 
                      | None   -> failwith "The x-value is not part of the section used to estimate the spline coefficients, thus a monotone function progression can not be guaranteed"
                  evalAt i t
                  )
  
negative.code:                     |> List.map (fun ex -> {ex with Xvalue = Aux.roundToNext ex.Xvalue x})
                      |> List.distinct
  
     
          [<Obsolete("Only applicable at equal x spacing. Use getExtrema instead")>]
          //calculates extrema with (type,x_value) where type is +1 for maxima and -1 for minima
          let getExtrema_equalSpacing (x:Vector<float>) (a:Vector<float>) (c:Vector<float>) =
  