Correct implementation of Heaviside step function; see http://en.wikipedia.org/wiki/Heaviside_step_function
Merge pull request #800 from NickPollard/topic/heaviside

Correct implementation of Heaviside step function