News for hackers. Stuff that matters.
Re:Divine By Zero by jmelloy on Tuesday June 07, 2011 @07:07PM (#2631321)
I've had situations where I'm calculating a ratio or something for each member of a result set, and needed a "safe_divide" function. Mine was much less complex than this one, but returned 0 if the denominator was 0.

There are no comments on this comment yet.