Also to answer your first question why the heck is g dropping one digit and doesn't seem to care about trailing zeroes

For the floating-point conversions 'e', 'E', and 'f' the precision is the number of digits after the decimal separator. If the conversion is 'g' or 'G', then the precision is the total number of digits in the resulting magnitude after rounding.