#include <iostream>
#include <kv/defint-singular.hpp>

typedef kv::interval<double> itv;

struct Func3_f {
	template <class T> T operator()(const T& x) {
		return sin(x);
	}
};

struct Func3_g {
	template <class T> T operator()(const T& x) {
		return cos(x);
	}
};

struct Func3 {
	template <class T> T operator()(const T& x) {
		return sqrt(sin(x)) * cos(x);
	}
};

int main() {
	std::cout.precision(17);

	std::cout << kv::defint_power3_autostep(Func3(), Func3_f(), Func3_g(), (itv)0., (itv)1, 12, (itv)0.5) << "\n";
}
