# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements.  See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License.  You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Test a truncation range that is completely below the mean.
parameters = 0.0, 1.0, -Infinity, -5.0
mean = -5.18650396712584211561650896200523673
variance = 0.0326964346171122253453158077009336653
lower = -Infinity
upper = -5
# Computed using Python with SciPy v1.6.0.
# a, b = -float('inf'), -5
# truncnorm.var(a, b)
cdf.points = \
  -Infinity, -6.09061174025149, -5.90979018562636, -5.72896863100123,\
  -5.54814707637611, -5.36732552175098, -5.18650396712585, -5.00568241250073, -5
cdf.values = \
  0.                   , 0.0019619645135723926,\
  0.005974914885121984 , 0.017624720306690118 ,\
  0.050359564359091676 , 0.13939004597162125  ,\
  0.373761183487693    , 0.97094304121535     ,\
  1.
pdf.values = \
  0.                 , 0.01225629220519301, 0.03627051385554845,\
  0.10388394392826272, 0.28796736254445054, 0.7725706891274351 ,\
  2.006010974330893  , 5.041137007541032  , 5.186503967125854
sf.values =  \
  1.                 , 0.9980380355514441 , 0.9940250852662816 , \
  0.9823752797552957 , 0.9496404359712429 , 0.8606099542475493 , \
  0.6262388168228976 , 0.02905695902309169, 0.

# Overridden tolerances
moments.relative = 1e-13
logpdf.relative = 1e-13
sf.relative = 1e-8
sf.mapping.relative = 2e-8
