Clip exponential in ffunc to avoid overflow
Clip exponential in ffunc to avoid overflow

This should avoid (hopefully) some possible FloatingPointError overflow errors.

The sigmoid function ffunc is for any x<-20 and x>20 already 0 resp. 1 up to 10^-9
and cutting will therefore not change the function substantially.

This idea is from @tmbdev in https://github.com/tmbdev/ocropy/issues/5#issuecomment-65329170
Implemented first in https://github.com/tmbdev/ocropy/issues/49#issuecomment-139919235
Additional infos from https://github.com/tmbdev/ocropy/issues/79#issue-126999594
amitdo/ocropy,amitdo/ocropy,stweil/ocropy,stweil/ocropy,zuphilip/ocropy,tmbdev/ocropy,zuphilip/ocropy,amitdo/ocropy,tmbdev/ocropy,tmbdev/ocropy,stweil/ocropy,zuphilip/ocropy