The code attempts various manipulations (e.g., BASE_TO_THE_MAX_DIGITS_M_X_2 / mantissa) in ln_helper(). If mantissa is extremely small or zero, you can end up dividing by zero. Conversely, if the exponent is huge, subsequent multiplications might overflow.  
