Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
strategy:
matrix:
rust: [
1.93.0, # MSRV
1.94.0, # MSRV
stable,
beta,
nightly,
Expand Down Expand Up @@ -52,7 +52,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@1.93.0
- uses: dtolnay/rust-toolchain@1.94.0
with:
components: rustfmt
- run: cargo fmt --all --check
Expand Down
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
[package]
name = "num-primitive"
version = "0.3.6"
version = "0.3.7"
description = "Traits for primitive numeric types"
repository = "https://github.com/rust-num/num-primitive"
license = "MIT OR Apache-2.0"
keywords = ["generic", "mathematics", "numerics", "primitive"]
categories = ["algorithms", "science", "no-std"]
edition = "2024"
rust-version = "1.93"
rust-version = "1.94"

[package.metadata.release]
allow-branch = ["main"]
Expand Down
5 changes: 5 additions & 0 deletions RELEASES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# Release 0.3.7 (2026-03-15)

- Updated to MSRV 1.94.
- Added `PrimitiveFloat::{EULER_GAMMA, GOLDEN_RATIO}`.

# Release 0.3.6 (2026-01-26)

- Link `const` documentation to the standard library.
Expand Down
8 changes: 8 additions & 0 deletions src/float.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,9 @@ pub trait PrimitiveFloat:
/// Euler's number (e)
const E: Self;

/// The Euler-Mascheroni constant (γ)
const EULER_GAMMA: Self;

/// 1/π
const FRAC_1_PI: Self;

Expand Down Expand Up @@ -146,6 +149,9 @@ pub trait PrimitiveFloat:
/// π/8
const FRAC_PI_8: Self;

/// The golden ratio (φ)
const GOLDEN_RATIO: Self;

/// ln(2)
const LN_2: Self;

Expand Down Expand Up @@ -487,6 +493,7 @@ macro_rules! impl_float {

use_consts!($consts::{
E: Self,
EULER_GAMMA: Self,
FRAC_1_PI: Self,
FRAC_1_SQRT_2: Self,
FRAC_2_PI: Self,
Expand All @@ -496,6 +503,7 @@ macro_rules! impl_float {
FRAC_PI_4: Self,
FRAC_PI_6: Self,
FRAC_PI_8: Self,
GOLDEN_RATIO: Self,
LN_2: Self,
LN_10: Self,
LOG2_10: Self,
Expand Down
Loading