Carefully define signbit & isfinite

Fixes #502
Merge pull request #508 from jaredhoberock/issue-502

Carefully define signbit & isfinite