Skip to content

Stabilise EULER_GAMMA and GOLDEN_RATIO constants for f32 and f64.#151164

Merged
rust-bors[bot] merged 1 commit intorust-lang:mainfrom
bjoernager:euler-gamma-golden-ratio
Jan 16, 2026
Merged

Stabilise EULER_GAMMA and GOLDEN_RATIO constants for f32 and f64.#151164
rust-bors[bot] merged 1 commit intorust-lang:mainfrom
bjoernager:euler-gamma-golden-ratio

Conversation

@bjoernager
Copy link
Contributor

@bjoernager bjoernager commented Jan 15, 2026

Tracking issue: #146939

This PR renames the EGAMMA and PHI constants to EULER_GAMMA and GOLDEN_RATIO – respectively – and stabilises them under these names for f32 and f64:

// core::f16::consts

pub const GOLDEN_RATIO: f16;

pub const EULER_GAMMA: f16;

// core::f32::consts

pub const GOLDEN_RATIO: f32;

pub const EULER_GAMMA: f32;

// core::f64::consts

pub const GOLDEN_RATIO: f64;

pub const EULER_GAMMA: f64;

// core::f128::consts

pub const GOLDEN_RATIO: f128;

pub const EULER_GAMMA: f128;

The feature gate for the stabilised items is also changed to euler_gamma_golden_ratio.

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Jan 15, 2026
@rustbot
Copy link
Collaborator

rustbot commented Jan 15, 2026

r? @jhpratt

rustbot has assigned @jhpratt.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@bjoernager
Copy link
Contributor Author

@rustbot label +T-libs-api -T-libs

r? libs-api

@rustbot rustbot added T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. and removed T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Jan 15, 2026
@rustbot rustbot assigned BurntSushi and unassigned jhpratt Jan 15, 2026
@rust-log-analyzer

This comment has been minimized.

@bjoernager bjoernager force-pushed the euler-gamma-golden-ratio branch from 8f7d4ee to 7f9237d Compare January 15, 2026 15:04
@rust-log-analyzer

This comment has been minimized.

@bjoernager bjoernager force-pushed the euler-gamma-golden-ratio branch from 7f9237d to 6cd4359 Compare January 15, 2026 15:20
Copy link
Contributor

@traviscross traviscross left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks right to me.

View changes since this review

@jhpratt
Copy link
Member

jhpratt commented Jan 16, 2026

@bors r+ rollup

@rust-bors
Copy link
Contributor

rust-bors bot commented Jan 16, 2026

📌 Commit 6cd4359 has been approved by jhpratt

It is now in the queue for this repository.

@rust-bors rust-bors bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 16, 2026
rust-bors bot pushed a commit that referenced this pull request Jan 16, 2026
Rollup of 5 pull requests

Successful merges:

 - #150607 (Add amdgpu_dispatch_ptr intrinsic)
 - #150611 (Unify and deduplicate From<T> float tests)
 - #151082 (Silence unused type param error on struct parse error)
 - #151159 (Tidying up `tests/ui/issues` 15 tests [8/N])
 - #151164 (Stabilise `EULER_GAMMA` and `GOLDEN_RATIO` constants for `f32` and `f64`.)

r? @ghost
@kennytm kennytm added the relnotes Marks issues that should be documented in the release notes of the next release. label Jan 16, 2026
@rust-bors rust-bors bot merged commit c3120ff into rust-lang:main Jan 16, 2026
11 checks passed
rust-timer added a commit that referenced this pull request Jan 16, 2026
Rollup merge of #151164 - euler-gamma-golden-ratio, r=jhpratt

Stabilise `EULER_GAMMA` and `GOLDEN_RATIO` constants for `f32` and `f64`.

Tracking issue: #146939

This PR renames the `EGAMMA` and `PHI` constants to `EULER_GAMMA` and `GOLDEN_RATIO` – respectively – and stabilises them under these names for `f32` and `f64`:

```rust
// core::f16::consts

pub const GOLDEN_RATIO: f16;

pub const EULER_GAMMA: f16;

// core::f32::consts

pub const GOLDEN_RATIO: f32;

pub const EULER_GAMMA: f32;

// core::f64::consts

pub const GOLDEN_RATIO: f64;

pub const EULER_GAMMA: f64;

// core::f128::consts

pub const GOLDEN_RATIO: f128;

pub const EULER_GAMMA: f128;
```

The feature gate for the stabilised items is also changed to `euler_gamma_golden_ratio`.
@rustbot rustbot added this to the 1.94.0 milestone Jan 16, 2026
@SpriteOvO SpriteOvO added the A-floating-point Area: Floating point numbers and arithmetic label Jan 16, 2026
@Mark-Simulacrum Mark-Simulacrum modified the milestone: 1.94.0 Jan 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-floating-point Area: Floating point numbers and arithmetic relnotes Marks issues that should be documented in the release notes of the next release. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants