# 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.

parameters = -4.6 12.2
# Computed using scipy.stats uniform(-4.6, 16.8)
mean = 3.8
variance = 23.52
lower = -4.6
upper = 12.2
cdf.points = \
  -4.6, -4, -3, -1.5, 0, 1.1, 1.9, 2.7, 5.5, 9.1, 11.3, 12.2
cdf.values = \
  0.                 , 0.03571428571428569, 0.09523809523809522, \
  0.1845238095238095 , 0.2738095238095238 , 0.33928571428571425, \
  0.38690476190476186, 0.4345238095238095 , 0.6011904761904762 , \
  0.8154761904761904 , 0.9464285714285714 , 1.0
pdf.values = \
  0.05952380952380952, 0.05952380952380952, 0.05952380952380952, \
  0.05952380952380952, 0.05952380952380952, 0.05952380952380952, \
  0.05952380952380952, 0.05952380952380952, 0.05952380952380952, \
  0.05952380952380952, 0.05952380952380952, 0.05952380952380952
# 1-cdf is inaccurate
sf.values = \
  1.0000000000000000e+00, 9.6428571428571430e-01,\
  9.0476190476190477e-01, 8.1547619047619047e-01,\
  7.2619047619047628e-01, 6.6071428571428581e-01,\
  6.1309523809523814e-01, 5.6547619047619047e-01,\
  3.9880952380952384e-01, 1.8452380952380965e-01,\
  5.3571428571428603e-02, 0.0
cdf.hp.points = -4.599999999999999
cdf.hp.values = 5.2867763077388404e-17
# Created manually as scipy.stats does not have this to high precision.
# (12.2 - Math.nextDown(12.2)) / (12.2 - -4.6)
sf.hp.points = 12.199999999999998
sf.hp.values = 1.0573552615477683E-16

# Overridden tolerances

# probability(x0, x1) test expects this to be cdf(x1) - cdf(x0).
# The computation is 0.5 ulp exact using (x1 - x0) / (upper - lower).
# Configure the absolute error to allow this.
consistency.absolute = 5e-15

# Lower tolerance to pass survival function test.
# scipy uniform does not appear to compute sf to high precision.
sf.relative = 1e-14
