I was wondering if it might be possible to create a modified version of log_normcdf as follows:
The current version computes the log of the Gaussian tail from -Inf to x, or, as is stated in the comments of log_normcdf:
% Y = LOG_NORMCDF(X) is the logarithm of the CDF of the normal
% distribution at the point X.
%
% 1 / x
% LOG_NORMCDF(X) = LOG( ------- | exp(-t^2/2) dt )
% sqrt(2) / -Inf
%
(I believe this description is missing a pi in the denominator out front, but that’s irrelevant to my question).
I am interested in a problem where I’d like to compute the log of this same integral, but from x to y, instead of -Inf to x. This is still a concave function, so it should be possible and seems like it would be a trivial modification, but I don’t quite understand how cvx has implemented log_normcdf. How hard would this be to add? (Any pointers as to how to do it myself would be sufficient for now.)