ideal diode equation derivation 275496