fixed invalid check for zero denominator
phpspec added as dep
specs written