Fix #3756: Convert values to float for number formatting

Convert string values to floating point, so that `number_format` method can properly format values.
Fix #3756: Convert values to float for number formatting