Oops, fixed my previous implementation

My previous implementation of getting a trailing .0 worked for
integer values stored as floating point, but not for floating
point numbers that would, by default, print multiple decimal
places.  Duh.  This fixes that by doing string post-processing.
However, I'm now getting different rounding modes in C vs. Perl
for reasons I can't fathom yet.
Fix previous rounding error

It turns out that the issue was that I wasn't first computing a
floating point number before sprintf-ing it.  I have no idea
why the direct sprintf-of-an expression would behave differently
than storing it in a variable first, but it seems to.