#include <iostream>
#include <chrono>
#include <cmath>
using namespace std;
using std::chrono::high_resolution_clock;
using std::chrono::nanoseconds;
using std::chrono::duration_cast;

inline int size() {
	return 1000;
}

double shit = 0.2;
void do_work() {
	shit += sin(shit);
}

int main() {
	auto t1 = high_resolution_clock::now();
	for ( int i=size(); i--; ) do_work();
	auto t2 = high_resolution_clock::now();
	for ( int i = 0; i < size(); ++i ) do_work();
	auto t3 = high_resolution_clock::now();
	auto timer1 = duration_cast<nanoseconds>(t2 - t1).count();
	auto timer2 = duration_cast<nanoseconds>(t3 - t2).count();
	cout << timer1 << ", " << timer2 << ", " << shit;
	return 0;
}