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

typedef kv::interval<double> itv;

struct Func {
	template <class T> T operator() (const T& x) {
		return (1 - x * x) / (1 + x * x);
	}
};

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

	std::cout << kv::defint(Func(), (itv)-1., (itv)1., 12, 10) << "\n";
	std::cout << kv::defint_autostep(Func(), (itv)(-1.), (itv)1., 12) << "\n";
}
