SimTk/msmbuilder — pull request #230 by rmcgibbo (2013-07-29 02:55:02+00:00)
Title: Overflow on invert

When taking reciprocals, checking against zero is not sufficient to avoid floating point exceptions. Most denorms overflow when you invert them, for instance. e.g

```
>>> import numpy as np
>>> 1.0/np.array([1e-40], dtype=np.float32)
__main__:1: RuntimeWarning: overflow encountered in divide
array([ inf], dtype=float32)
```

I wrote some SSE code to run a flush-to-zero on denorms, but I don't really feel like merging it. This is easier for now. That code is here https://github.com/rmcgibbo/ftz