Skip to content

Tracking Issue for general floating point formatting  #69486

@mxxo

Description

@mxxo

This is a tracking issue for general human-readable floating point formatting akin to C's printf("%g").

RFCs:

Link Description
RFC 844 Original request for a %g-style format
RFC 2729 Detailed RFC by @ExpHP proposing a {:g?} Debug formatter following the stabilization of {:x?}.

Open questions:

  1. Format specifier and trait (:g | :g? | :#?). Extend Debug or introduce LowerGen, UpperGen formatting traits?

From RFC 2729:

  1. The precise format is subject to heavy bikeshedding.
  2. When should the format be considered final? On stabilization of {:g?}? On stabilization of {:g} if it occurs?
  3. Public API for this and RFC 2226

Links:

Pre-RFC discussion: https://internals.rust-lang.org/t/pre-rfc-draft-g-or-floating-points-for-humans/9110

Related crates:

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFC

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions