calculate the forward and reverse bias resistance