add case for nan in expm1, avoid signed integer overflow