In the 'MOL' (Mollweide) case, the Newton iteration can get stuck in a loop before tolerance is reached because the numerator in the iteration step reaches the double precision "EPS" value (defined as the smallest value for which 1-eps NE 1). Fix is to separately test for this:
machine_constants = MACHAR(/DOUBLE)
eps = machine_constants.eps > machine_constants.epsneg
repeat begin
...
endrep until (old condition OR MAX(ABS(numerator) LE eps)
In the 'MOL' (Mollweide) case, the Newton iteration can get stuck in a loop before tolerance is reached because the numerator in the iteration step reaches the double precision "EPS" value (defined as the smallest value for which 1-eps NE 1). Fix is to separately test for this:
machine_constants = MACHAR(/DOUBLE) eps = machine_constants.eps > machine_constants.epsneg repeat begin ... endrep until (old condition OR MAX(ABS(numerator) LE eps)