python3 <<'EOF' import math tr=1.0 tf=50.0 ts=100.0 S=0.2 def H(t): return (1-S)*math.exp(-t/tf)+S*math.exp(-t/ts)-math.exp(-t/tr) peak=0.0 pt=0.0 for i in range(200000): t=i*0.0001 v=H(t) if v>peak: peak=v pt=t half=peak/2 left=0.0 for i in range(int(pt/0.0001)+1): t=i*0.0001 if H(t)>=half: left=t break right=0.0 for i in range(int(pt/0.0001),2000000): t=i*0.0001 if H(t)