# 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 one-sided truncation with an upper tail.
parameters = -9.6, 17.0, -15.0, Infinity
mean = 0.723583450712812
variance = 126.676274102319
lower = -15
upper = Infinity
# Computed using Python with SciPy v1.6.0.
# mean, std, clip_a, clip_b = -9.6, 17.0, -15.0, float('inf')
# a, b = (clip_a - mean) / std, (clip_b - mean) / std
# truncnorm.var(a, b, loc=mean, scale=std)
cdf.points = \
  -15, -10.5314720401464, 0.723583450712814, 11.978638941572, 23.2336944324312,\
  34.4887499232902, 45.7438054141485, 56.9988609050074, Infinity
cdf.values = \
  0.                 , 0.16453997469872794, 0.564800349576255  ,\
  0.8364432890176926 , 0.9572267465409453 , 0.9923940817717739 ,\
  0.9990939685603362 , 0.9999284030107741 , 1.
pdf.values = \
  3.5721742043988973e-02, 3.7513776681817858e-02,\
  3.1243806318771911e-02, 1.6787051846403060e-02,\
  5.8186505170566153e-03, 1.3010903661149294e-03,\
  1.8768518629755845e-04, 1.7465856071542793e-05,\
  0.0000000000000000e+00

# Overridden tolerances
sf.relative = 1e-13
