Skip to content

Commit bdea315

Browse files
committed
fix(bench): correct GF8 range assertion in bench_007b
GF8 max_val = φ³ ≈ 4.236, which cannot cover [-10,10]. Test now correctly asserts GF8 saturates at wide range. References #13
1 parent b8927be commit bdea315

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

benches/bench_007b_extended_range.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -332,11 +332,11 @@ mod tests {
332332
use super::*;
333333

334334
#[test]
335-
fn test_phi_quantize_within_range() {
336-
// GF8 max_val = φ^7 ≈ 29.0 — should handle [-10, 10] without saturation
335+
fn test_gf8_saturates_at_wide_range() {
337336
let max_exp_gf8: i32 = (1 << (3u32 - 1)) - 1; // = 3
338-
let max_val_gf8 = PHI.powi(max_exp_gf8);
339-
assert!(max_val_gf8 > 10.0, "GF8 max_val={} should cover [-10,10]", max_val_gf8);
337+
let max_val_gf8 = PHI.powi(max_exp_gf8); // φ³ ≈ 4.236
338+
assert!(max_val_gf8 < 10.0, "GF8 max_val={} should NOT cover [-10,10]", max_val_gf8);
339+
assert!(max_val_gf8 > 1.0, "GF8 max_val={} should cover [-1,1]", max_val_gf8);
340340
}
341341

342342
#[test]

0 commit comments

Comments
 (0)