bvnd

Function bvnd 

Source
pub fn bvnd(x: f64, y: f64, rho: f64) -> f64
Expand description

Evaluate Pr[ X > x, Y > y ] for X, Y standard normals of correlation coefficient rho.

rho must be in the range [-1.0, 1.0].

If x or y equals +∞, the result will be 0.0. If x or y equals -∞, the result will be a univariate CDF value corresponding to the other parameter. If both are -∞ the result will be 1.0.

Note: This function uses just about 1kb of stack memory. Typical programs have 4-8kb of stack, so this should usually be fine.

If that’s too much for your application, you can alternatively:

  • allocate a BatchBvnd object somewhere else and call bvnd on it
  • use [tvpack::bvnd] instead, but it won’t have SIMD optimizations then.
  • use owens_t::biv_norm instead, from owens-t crate