public static Double grandDaddy(Double freeEnergy, Double enthalpy, Double temperature, Double entropy)
	{
		boolean[] nulls = new boolean[4];
		nulls[0] = (freeEnergy == null);
		nulls[1] = (enthalpy == null);
		nulls[2] = (temperature == null);
		nulls[3] = (entropy == null);
		
		int nullCount = 0;
		for(int k = 0; k < nulls.length; k++)
		{
			if(nulls[k])
				nullCount++;
		}
		
		if(nullCount != 1)
			return null;
		
		double result = 0;
		
		if(nulls[0])
		{
			// freeEnergy is unknown
			result = enthalpy - temperature*entropy;
		}
		else if(nulls[1])
		{
			// enthalpy is unknown
			result = freeEnergy + temperature*entropy;
		}
		else if(nulls[2])
		{
			// temperature is unknown
			result = -(freeEnergy - enthalpy)/entropy;
		}
		else if(nulls[3])
		{
			// entropy is unknown
			result = -(freeEnergy - enthalpy)/temperature;
		}
		
		return result;
	}