Skip to content

Tracking Issue for more_float_constants #103883

Open
@ghost

Description

Feature gate: #![feature(more_float_constants)]

This is a tracking issue for additional constants in the {f32,f64}::consts modules.

ACP: rust-lang/libs-team#119

Public API

// in core::{f32, f64}::consts

/// The golden ratio (φ)
pub const PHI: f64 = 1.618033988749894848204586834365638118_f64;

/// The Euler-Mascheroni constant (γ)
pub const EGAMMA: f64 = 0.577215664901532860606512090082402431_f64;

/// 1/sqrt(π)
pub const FRAC_1_SQRT_PI: f64 = 0.564189583547756286948079451560772586_f64;

/// sqrt(3)
pub const SQRT_3: f64 = 1.732050807568877293527446341505872367_f64;

/// 1/sqrt(3)
pub const FRAC_1_SQRT_3: f64 = 0.577350269189625764509148780501957456_f64;

Steps / History

Unresolved Questions

  • Naming of the Euler-Mascheroni constant (gamma)
  • Any additional constants?
    • ln(3)

Footnotes

  1. https://std-dev-guide.rust-lang.org/feature-lifecycle/stabilization.html

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions