tacet_core/constants.rs
1//! Mathematical constants used throughout the crate.
2
3/// Default deterministic seed for RNG operations.
4///
5/// This seed ensures reproducibility: same seed + same data = same result.
6/// The value `0x74696D696E67` is "timing" encoded in ASCII.
7pub const DEFAULT_SEED: u64 = 0x74696D696E67;
8
9/// Decile percentiles for quantile computation.
10pub const DECILES: [f64; 9] = [0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9];
11
12/// Natural log of 2*pi, used in multivariate normal log-pdf computation.
13pub const LOG_2PI: f64 = 1.8378770664093453;
14
15// =============================================================================
16// Default configuration constants (spec ยง3.4)
17// =============================================================================
18
19/// Default pass threshold for Bayesian decision: P(leak) < 0.05 means Pass.
20pub const DEFAULT_PASS_THRESHOLD: f64 = 0.05;
21
22/// Default fail threshold for Bayesian decision: P(leak) > 0.95 means Fail.
23pub const DEFAULT_FAIL_THRESHOLD: f64 = 0.95;
24
25/// Default number of bootstrap iterations for covariance estimation.
26pub const DEFAULT_BOOTSTRAP_ITERATIONS: usize = 2000;
27
28/// Default number of calibration samples per class.
29pub const DEFAULT_CALIBRATION_SAMPLES: usize = 5000;
30
31/// Default batch size for adaptive sampling loop.
32pub const DEFAULT_BATCH_SIZE: usize = 1000;
33
34/// Default maximum samples per class before stopping.
35pub const DEFAULT_MAX_SAMPLES: usize = 1_000_000;
36
37/// Default time budget in seconds.
38pub const DEFAULT_TIME_BUDGET_SECS: u64 = 60;