anchor.diff:      | Linear(x1,x2,density) ->
           if x1=x2 then x1 else
           let h = 2./(x2-x1)
  -        let p, pmin, pmax = if h>0. then density, 0., h else -density, h, 0.
  +        let p, pmin, pmax = if h>improbable then density, improbable, h else -density, h, -improbable
           let p1 = if p<pmin then pmin elif p>pmax then pmax else p // p1 = 2*a*x1+b
           let p2 = h-p1 // 0.5*(p1+p2)*(x2-x1) == 1; p2 = 2*a*x2+b
           let a4 = (p2-p1)*h // 4*a
  
positive.code:   | Exponential of mean:float // rate lambda (>0) -> continuous [0 to infinity)
    /// A weighted mixture of distributions.
    | Mixture of (float*Distribution) list
  
  /// The smallest positive normalized `float` value
  let improbable = 2.2250738585072014E-308 // 2^(-1022)
  
negative.code:                 if v < min x1 x2 || v > max x1 x2 then log_improbable
                  elif x1=x2 then infinity else
                  let h = 2./abs(x2-x1)
                  let p1 = if density<improbable then improbable elif density > h then h else density // p1 = 2*a*x1+b
                  let p2 = h-p1 // 0.5*(p1+p2)*abs(x2-x1) == 1; p2 = 2*a*x2+b
                  log(p1+(v-x1)*(p2-p1)/(x2-x1))
              | Exponential(mean) -> 
  