Validate input as float, fix #1
Merge pull request #4 from alykhank/validate

Validate input as float, fix #1