Removed unsafe use of sprintf().
Changed floating point format from %f to %.12g
Merge pull request #2 from AVSystem/issue-1

Fixes #1
Issue 1