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:                     if not plateau then
                          if traceA.[0] < (Seq.last traceA) then "I" else "D"
                      else
                          //get Array of secondderivatives with reasonably spacing (xValues and halfsteps)
                          let sndDerivativeValues =
                              [0..xValues.Length-2]
                              |> List.map (fun x -> 
                                  let xValA = xValues.[x]
                                  let xValB = (xValues.[x] + xValues.[x+1]) / 2.
                                  [
                                  xValA,sndDerivFu xValA
                                  xValB,sndDerivFu xValB
                                  ]
                                  )
                              |> List.concat
                          let pseudoExtrema =
                              let processPseudoExtrema (pseudoExtrema :(float*float) list) =
                                  pseudoExtrema
  