Skip to content

Commit

Permalink
unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tgiani committed Oct 21, 2024
1 parent 61220f8 commit a40908b
Showing 1 changed file with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -118,4 +118,21 @@ mod tests {
let me = gamma_ns(&mut c, NF) + gamma_phq(&mut c, NF);
assert_approx_eq_cmplx!(f64, me, Complex::zero(), epsilon = 1e-12);
}

#[test]
fn photon_momentum_conservation() {
const N: Complex<f64> = cmplx!(2., 0.);
let mut c = Cache::new(N);

for nf in 2..7 {
let nu = uplike_flavors(nf);
let nd = nf - nu;
assert_approx_eq_cmplx!(
f64,
eu2 * gamma_qph(&mut c, nu) + ed2 * gamma_qph(&mut c, nd) + gamma_phph(&mut c, nf),
cmplx!(0., 0.),
epsilon = 2e-6
);
}
}
}

0 comments on commit a40908b

Please sign in to comment.