#include <iostream>
#include <vector>
#include <math.h>

using namespace std;

int main()
{
	vector<double> tvec;
	double tulorc;
	
	tvec.push_back(2.1);
	tvec.push_back(3.2);
	tvec.push_back(NAN);
	tvec.push_back(712.5);
	tvec.push_back(500.6);

	cout << "FOR test with tulorc: ";
	for (tulorc = 8; tulorc < 8; tulorc ++)
		cout << tulorc << " ";
	cout << "done." << endl;

	for(const double& dv : tvec)
	{
		if (isnan(dv))
			cout << "This is not a number" << endl;
		else
			cout << dv << endl;

		tulorc = dv;
		
		if (isnan(tulorc))
			cout << "   tulorc also is NaN" << endl;
		else
			cout << "   tulorc is a number" << endl;
	}

	return 0;
}