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

# As per uniform distribution (-0.5, 1.25)
# From [test.uniformcontinuous.1.properties]
parameters = -0.5 -0.5 1.25 1.25

# Computed using scipy.stats uniform(-0.5, 1.75)
mean = 0.375
variance = 0.2552083333333333
lower = -0.5
upper = 1.25
cdf.points = \
  -0.5001, -0.5, -0.4999, -0.25, -0.0001, 0.0,\
  0.0001, 0.25, 1.0, 1.2499, 1.25, 1.2501
cdf.values = \
  0.0000000000000000e+00, 0.0000000000000000e+00,\
  5.7142857142850847e-05, 1.4285714285714285e-01,\
  2.8565714285714289e-01, 2.8571428571428570e-01,\
  2.8577142857142857e-01, 4.2857142857142855e-01,\
  8.5714285714285710e-01, 9.9994285714285713e-01,\
  1.0000000000000000e+00, 1.0000000000000000e+00
pdf.values = \
  0.                , 0.5714285714285714, 0.5714285714285714,\
  0.5714285714285714, 0.5714285714285714, 0.5714285714285714,\
  0.5714285714285714, 0.5714285714285714, 0.5714285714285714,\
  0.5714285714285714, 0.5714285714285714, 0.
# 1-cdf is inaccurate.
# Create sf(1.2499) manually: (1.25-1.2499) / (1.25- -0.5)
sf.values = \
  1.000000000000000e+00, 1.000000000000000e+00,\
  9.999428571428571e-01, 8.571428571428572e-01,\
  7.143428571428572e-01, 7.142857142857143e-01,\
  7.142285714285714e-01, 5.714285714285714e-01,\
  1.428571428571429e-01, 5.7142857142850847e-05,\
  0.000000000000000e+00, 0.000000000000000e+00

# 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-17
# Lower tolerance to pass survival function test.
# scipy uniform does not appear to compute sf to high precision.
sf.relative = 1e-14
