anchor.diff:                  loop source
   
   
  -            let si    = tt |> Array.map (fun t -> t.Si)
  -            let stats = tt |> Array.map (fun t -> t.Statistics)
  +            let si = tt |> Array.map (fun t -> t.Si)
  +            let di = tt |> Array.map (fun t -> t.Statistics)
  +            let si' = Array.copy si
               let s0percentile= [|0. .. 0.05 .. 1.|] 
  -            let br = [|0. .. 0.01 .. 1.|] |> Array.map (fun p -> Quantile.InPlace.modeInPLace p si)            
  -
  +            let br = [|0. .. 0.01 .. 1.|] |> Array.map (fun p -> Quantile.InPlace.modeInPLace p si')            
               let cvSd =
  -                let tmp = Seq.zip si stats
  +                let tmp = Seq.zip si di
                   s0percentile
                   |> Array.map (fun k -> 
  -                    let w  = Quantile.InPlace.modeInPLace k si
  -                    // Calc corrected test statistic
  +                    let w  = if k = 0. then 0. else Quantile.InPlace.modeInPLace k si'
                       let mads = 
                           bind (fun a b -> fst b < a) br tmp
                           |> Seq.map (fun v ->
  
positive.code:                         cur |> Array.minBy (fun (dis,deis,delta)-> delta )
                  x,y)
          
          let cutsFromUp  = cuts ups los |> Array.map (fun (a,b) -> getDi a, getDi b )
  
          let cutsFromLow = cuts los ups |> Array.map (fun (a,b) -> getDi b, getDi a )
          [|cutsFromUp;cutsFromLow|]|> Array.concat |> Array.distinct
          
  
  
negative.code:         let replaceDeltaAbs (disA,deisA,deltaA) (disB,deisB,deltaB) = (disA,deisA,(abs deltaB))
          let di'  = di |> Array.sortBy (fun x -> x.Statistics)
          let dei' = dei |> Array.sortBy (fun x -> x.Statistics)
          let ups,los =
              Array.zip di' dei'
              |> Array.map (fun (di,dei) -> di.Statistics,dei.Statistics, (di.Statistics - dei.Statistics))
              |> Array.partition (fun (dis,deis,delta) -> deis >= 0.)
  