uniformv

double uniformv(double p, double a, double b);

Returns the critical point of the Uniform random variable distribution function on the interval [a,b] associated with probability p.

Parameters:
pCummulative probability for the critical point.
aLower bound parameter.
bUpper bound parameter.

Returns:
x such that P(X ≤ x | a, b) = p

Errors:
NUMERICS_ERROR is raised if a > b, p ≤ 0, or p ≥ 1

Usage:
double x = uniformv(.5, 1.5, 2.75)

Header:
#include "contdist.h"