From 274f8d28d24520fda046e3815645b29f22d5658b Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 13 Apr 2026 09:37:27 +0000 Subject: [PATCH] refactor: replace hardcoded EULER_GAMMA with std::f64::consts::EULER_GAMMA MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ocr_felt.rs had a truncated literal (0.5772156649 — 10 digits vs the full 16). Switching to std::f64::consts::EULER_GAMMA (Rust 1.94+) fixes the precision and eliminates the hardcoded constant. https://claude.ai/code/session_019RzHP8tpJu55ESTxhfUy1A --- src/hpc/ocr_felt.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hpc/ocr_felt.rs b/src/hpc/ocr_felt.rs index 286a53ea..72e984d7 100644 --- a/src/hpc/ocr_felt.rs +++ b/src/hpc/ocr_felt.rs @@ -11,8 +11,8 @@ use super::ocr_simd::{BinaryImage, GrayImage, foreground_count}; -/// Euler-Mascheroni constant. -const EULER_GAMMA: f64 = 0.5772156649; +/// Euler-Mascheroni constant (Rust 1.94+). +const EULER_GAMMA: f64 = std::f64::consts::EULER_GAMMA; /// Signal floor for skew detection: γ/(γ+1). const SKEW_FLOOR: f64 = EULER_GAMMA / (EULER_GAMMA + 1.0);