boundlab.poly.reciprocal_linearizer#

boundlab.poly.reciprocal_linearizer(ub, lb)[source]#

CROWN relaxation of \(1/x\) on a strictly positive domain.

1/x is convex on \((0, \infty)\):

  • Upper envelope: secant through \((\ell, 1/\ell)\) and \((u, 1/u)\).

  • Lower envelope: tangent at a point \(t_{\mathrm{opt}}\). The minimum-area tangent point is \(\sqrt{\ell u}\); we additionally clamp it to \(u/2 + 0.01\) to keep the lower envelope strictly positive (important when feeding softmax denominators).