CIMEHR is copyright (c) 2026 Cheng-Han Yang and Yiren Hou and is distributed
under the MIT license (see LICENSE), except for the parts listed below.

src/cimehr_pairwise.cpp

  The bivariate normal distribution function in this file is a C++
  translation of the Fortran functions MVBVU and MVPHI written by Alan Genz,
  including his Gauss-Legendre node and weight tables and his Chebyshev
  series coefficients for the univariate normal distribution function.
  These parts are copyright Alan Genz and are distributed under his
  BSD-style license, reproduced below.

  The translation was checked against the Fortran code by Alan Genz as
  distributed in the R package pbivnorm (Fortran code by Alan Genz, R code by
  Brenton Kenkel).

  Reference:
  Genz, A. (2004). Numerical computation of rectangular bivariate and
  trivariate normal and t probabilities. Statistics and Computing, 14,
  251-260.

  License of the parts by Alan Genz:

    Copyright (C) 2013, Alan Genz,  All rights reserved.

    Redistribution and use in source and binary forms, with or without
    modification, are permitted provided the following conditions are met:
      1. Redistributions of source code must retain the above copyright
         notice, this list of conditions and the following disclaimer.
      2. Redistributions in binary form must reproduce the above copyright
         notice, this list of conditions and the following disclaimer in
         the documentation and/or other materials provided with the
         distribution.
      3. The contributor name(s) may not be used to endorse or promote
         products derived from this software without specific prior
         written permission.
    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
    "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
    LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
    FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
    COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
    INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
    BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
    OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
    ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
    TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF USE
    OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
