blob: a0406b026b96ebc92565e467d189d24646caa15d [file] [log] [blame]
//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is dual licensed under the MIT and the University of Illinois Open
// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// <random>
// template<class RealType = double>
// class cauchy_distribution
// explicit cauchy_distribution(result_type a = 0, result_type b = 1);
#include <random>
#include <cassert>
int main()
{
{
typedef std::cauchy_distribution<> D;
D d;
assert(d.a() == 0);
assert(d.b() == 1);
}
{
typedef std::cauchy_distribution<> D;
D d(14.5);
assert(d.a() == 14.5);
assert(d.b() == 1);
}
{
typedef std::cauchy_distribution<> D;
D d(14.5, 5.25);
assert(d.a() == 14.5);
assert(d.b() == 5.25);
}
}