original_docstring: Truncates/pads a float f to n decimal places without rounding
docstring: Truncates/pads a float f to n decimal places without rounding
docstring_tokens: Truncates / pads a float f to n decimal places without rounding
code: def truncate(f, n):
      '''Truncates/pads a float f to n decimal places without rounding'''
      s = '%.12f' % f
      i, p, d = s.partition('.')
      return float('.'.join([i, (d+'0'*n)[:n]]))
code_tokens: def truncate ( f , n ) : s = '%.12f' % f i , p , d = s . partition ( '.' ) return float ( '.' . join ( [ i , ( d + '0' * n ) [ : n ] ] ) )
short_docstring: Truncates/pads a float f to n decimal places without rounding
short_docstring_tokens: Truncates / pads a float f to n decimal places without rounding
comment: '''Truncates/pads a float f to n decimal places without rounding'''