 			}
 		}
 		Nsteps += 1;
-		if (Nsteps >= Max_no_steps) {
-			//todo implement return codes
+		if (Nsteps >= Max_no_steps)
+		{
 			y[0] = logf(-1);
 			return;
 		}
-		if (0.1 * fabs(H) <= fabs(t) * Roundoff) {
-			//todo implement return codes
+		if (0.1 * fabs(H) <= fabs(t) * Roundoff)
+		{
 			y[0] = logf(-1);
 			return;
 		}

			if (NewtonIter > 0) 
			{
				Theta = NewtonIncrement / NewtonIncrementOld;
				if (Theta < 0.99) {
					NewtonRate = Theta / (ONE - Theta);
				}
				else { //! Non-convergence of Newton: Theta too large
					break;
				}
				if (NewtonIter < NewtonMaxit) {
					//Predict error at the end of Newton process 
					double NewtonPredictedErr = (NewtonIncrement * pow(Theta, (NewtonMaxit - NewtonIter - 1))) / (ONE - Theta);
					if (NewtonPredictedErr >= NewtonTol) {
						//Non-convergence of Newton: predicted error too large
						double Qnewton = fmin(10.0, NewtonPredictedErr / NewtonTol);
	                    Fac = 0.8 * pow(Qnewton, -ONE/((double)(NewtonMaxit-NewtonIter)));
	                    break;
					}
				}
			}


	#define NEWTON_UNROLLER	#pragma unroll NEWTON_UNROLL
#else
	#define NEWTON_UNROLLER #pragma unroll 1
#endif
#ifdef WARP_VOTING
	#define ANY(X) (__any((X)))
	#define ALL(X) (__all((X)))
#else
	#define ANY(X) ((X))
	#define ALL(X) ((X))
#endif
#define Max_no_steps (200000)
#define NewtonMaxit (8)
