from math import log
from __future__ import division
VT=26*10**(-3)
print "VT= %0.2f"%(VT)," volts" # Thermal voltage
R1=5*10**(3)
print "R1= %0.2f"%(R1)," ohm" # resistance
Iso=1*10**(-10)
print " Iso = %0.2e"%(Iso)," ampere" # Scale factor (as current)directly proportional to cross-section area of EBJ
print "part(i)"
vs=1*10**(-3)
print "vs= %0.2e"%(vs)," volts" # Input voltage1
vo=-VT*(log(vs/(Iso*R1)))
print "vo=-VT*(log(vs/(Iso*R1)))= %0.2f"%(vo)," volts" # Output voltage of Log OP-AMP for input1 i.e vs = 1 mV
print "part(ii)"
vs=10*10**(-3)
print "vs= %0.2e"%(vs)," volts" # Input voltage2
vo=-VT*(log(vs/(Iso*R1)))
print "vo=-VT*(log(vs/(Iso*R1)))= %0.2f"%(vo)," volts" # Output voltage of Log OP-AMP for input1 i.e vs = 10 mV
print "part(iii)"
vs=100*10**(-3)
print "vs= %0.2f"%(vs)," volts" # Input voltage3
vo=-VT*(log(vs/(Iso*R1)))
print "vo=-VT*(log(vs/(Iso*R1)))= %0.2f"%(vo)," volts" # Output voltage of Log OP-AMP for input1 i.e vs = 100 mV
print "part(iv)"
vs=1
print "vs= %0.2f"%(vs)," volts" # Input voltage4
vo=-VT*(log(vs/(Iso*R1)))
print "vo=-VT*(log(vs/(Iso*R1)))= %0.2f"%(vo)," volts" # Output voltage of Log OP-AMP for input1 i.e vs = 1V
from math import log
from __future__ import division
VT=26*10**(-3)
print "VT= %0.2f"%(VT)," volts" # Thermal voltage
R1=100*10**(3)
print "R1= %0.2f"%(R1)," ohm" # resistance
Iso=50*10**(-9)
print " Iso = %0.2e"%(Iso)," ampere" # Scale factor (as current)directly proportional to cross-section area of EBJ
vs=2.5
print "vs= %0.2f"%(vs)," volts" # Input voltage
vo=-VT*(log(vs/(Iso*R1)))
print "vo=-VT*(log(vs/(Iso*R1)))= %0.2f"%(vo)," volts" # Output voltage of Log OP-AMP for input1 i.e vs = 2.5 V
from math import exp
from __future__ import division
VT=26*10**(-3)
print "VT= %0.2f"%(VT)," volts" # Thermal voltage
RF=100*10**(3)
print "RF= %0.2e"%(RF)," ohm" # resistance
Iso=50*10**(-9)
print " Iso = %0.2e"%(Iso)," ampere" # Scale factor (as current)directly proportional to cross-section area of EBJ
vs=-0.162
print "vs= %0.2f"%(vs)," volts" # Input voltage
vo=Iso*RF*(exp(-vs/VT))
print "vo=Iso*RF*(exp(-vs/VT))= %0.2f"%(vo)," volts" # Output voltage of Antilog OP-AMP for input1 i.e vs = -0.162 V