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
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
name = "ndarray"
version = "0.17.2"
edition = "2021"
rust-version = "1.64"
rust-version = "1.94"
authors = [
"Ulrik Sverdrup \"bluss\"",
"Jim Turner"
Expand Down
2 changes: 1 addition & 1 deletion src/hpc/compression_curves.rs
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ impl ProductQuantizer {
// Method 5: SPO Bundle (our method)
// ============================================================================

const PHI: f64 = 1.618_033_988_749_895;
const PHI: f64 = std::f64::consts::GOLDEN_RATIO;

const fn golden_shift(d: usize) -> usize {
let raw = (d as f64 / (PHI * PHI)) as usize;
Expand Down
4 changes: 2 additions & 2 deletions src/hpc/spo_bundle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
// Constants
// ============================================================================

/// Golden ratio φ ≈ 1.618033988749895
const PHI: f64 = 1.618_033_988_749_895;
/// Golden ratio φ — Rust 1.94 stdlib constant.
const PHI: f64 = std::f64::consts::GOLDEN_RATIO;

/// Compute golden shift for dimension d, ensuring odd (gcd=1 with power-of-2 d).
/// floor(d / φ²), rounded to nearest odd.
Expand Down
4 changes: 2 additions & 2 deletions src/hpc/surround_metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ use super::fingerprint::Fingerprint;
/// Golden angle in radians: 2π / φ² ≈ 2.39996...
const GOLDEN_ANGLE: f64 = 2.399_963_229_728_653;

/// Euler-Mascheroni constant γ ≈ 0.5772...
const EULER_GAMMA: f64 = 0.577_215_664_901_532_9;
/// Euler-Mascheroni constant γ — Rust 1.94 stdlib constant.
const EULER_GAMMA: f64 = std::f64::consts::EULER_GAMMA;

/// Bundle dimensionality: 8192 f64 values (must be even for Givens pairs)
const D: usize = 8192;
Expand Down
4 changes: 1 addition & 3 deletions src/hpc/vml.rs
Original file line number Diff line number Diff line change
Expand Up @@ -466,9 +466,7 @@ mod tests {
fn test_f64_golden_step_hydration_cost() {
use std::f64::consts;
// Rust 1.94: std::f64::consts::PHI and GAMMA are stable.
// On 1.93: define manually.
#[allow(dead_code)]
const PHI: f64 = 1.618033988749894848204586834365638118;
const PHI: f64 = std::f64::consts::GOLDEN_RATIO;

// Simulate: 4096D f64 vector → Base17-style projection → hydration back
let d = 4096usize;
Expand Down
Loading