JavaScript implementation of sign analysis from http://matt.might.net/articles/intro-static-analysis/