#pragma TASS input
double e;

#pragma TASS abstract continuous (1)
double atan(double x);

#pragma TASS abstract continuous (1)
double tan(double x);

#pragma TASS abstract continuous (1)
double cos(double x);

#pragma TASS abstract continuous (1)
double sqrt(double x);

#pragma TASS abstract continuous (1)
double pow(double x, double y);

#pragma TASS abstract continuous (1)
double log(double x);

#pragma TASS abstract continuous (1)
double exp(double x);

void main()
{
	double one;
	double two;
	double three;
	double four;
	double five;
	double six;
	double pi;
	int i;
	int fin;
		
	/* Teach TASS about the math functions */
#pragma TASS assume forall{double x | x > 0} tan(atan(x)) == x;
#pragma TASS assume forall{double x} pow(sqrt(x), 2.0) == x;
#pragma TASS assume forall{double x} pow(x, 2.0) == x*x;
#pragma TASS assume forall{double x} log(exp(x)) == x;
	
	one = 2.0 - 1.0;
	assert one == 1.0;
	//printf("one   = %2.16f\n", one);
	
	pi = 4.0*atan(1.0);
#pragma TASS assume cos(pi/4) != 0.0;
#pragma TASS assume forall{double x} cos(2*pi + x) == cos(x);
	/* printf ( " Value of PI = %2.16f \n\n", pi ); */
	
	two = pow ( 1.0/(cos (100.0*pi+pi/4)), 2.0);
	assert two == 2.0;
	//printf("two   = %2.16f\n", two);
	
	three = 3.0*tan(atan(100000000.0))/100000000.0;
	assert three == 3.0;
	//printf("three = %2.16f\n", three);
	
	four = 4.0;
	for (i=0; i<20; i++)
		four = sqrt(four);
	for (i=0; i<20; i++)
		four *= four; 
	assert four == 4.0;
	//printf("four  = %2.16f\n", four);
	
	five = 5.0 * ((1.0 + exp(-100.0)) - 1.0) / ((1.0 + exp(-100.0)) - 1.0) ;
	assert five == 5.0;
	//printf("five  = %2.16f\n", five);
	
	six = log (exp(6000.0))/1000.0;
	assert six == 6.0;
	//printf("six   = %2.16f\n", six);
	
}
