.PS cct_init # Usual defs... qrt=dimen_/4; hlf=dimen_/2; dim=dimen_; Op1:opamp(,,,,P) line from Op1.In1 left_ qrt resistor(left_); rlabel(,100k,) dot; "$V_i$ " ljust_ line from Op1.In2 left_ qrt then down_ qrt; ground; move from Op1.In1 left_ qrt; dot; line up_ 0.6*dim; right_ Mid:dot # Check this trick China :-) (My first use of invisible lines :-) # (June 5 1999, believe it or not... Twenty years of Circuit Macros.) I1:line invis to (Op1.Out,Here) move to I1.center then left_ hlf D1:diode(right_); llabel(,D_1,) line from D1.end to I1.end; line to Op1.Out line from I1.start to D1.start dot(at Op1.Out) D2:diode(right_); llabel(,D_2,); dot line right_ qrt; dot " $V_\mathrm{out}$" ljust_ line from Mid up_ 0.6*dim I2:line invis to (D2.end,Here) move to I2.center then left_ hlf R1:resistor(right_); llabel(,100k,); line from I2.start to R1.start line from R1.end to I2.end then to D2.end; dot "\tiny PrecisionHalf" at (1.5*dim, -1*dim) rjust_ .PE