def _bounded_exp(value):
  try:
    return exp(value)
  except OverflowError:
    return float("inf")
Emulate the Java version of exp
dataset/ETHPy150Open Cue/scales/src/greplin/scales/samplestats.py/_bounded_exp