diff --git a/crates/ekore/src/anomalous_dimensions/unpolarized/spacelike/as1.rs b/crates/ekore/src/anomalous_dimensions/unpolarized/spacelike/as1.rs index e35a87472..6d25e1c51 100644 --- a/crates/ekore/src/anomalous_dimensions/unpolarized/spacelike/as1.rs +++ b/crates/ekore/src/anomalous_dimensions/unpolarized/spacelike/as1.rs @@ -63,7 +63,7 @@ mod tests { #[test] fn number_conservation() { - const N: Complex = cmplx![1., 0.]; + const N: Complex = cmplx!(1., 0.); let mut c = Cache::new(N); let me = gamma_ns(&mut c, NF); assert_approx_eq_cmplx!(f64, me, Complex::zero(), epsilon = 1e-12); @@ -71,7 +71,7 @@ mod tests { #[test] fn quark_momentum_conservation() { - const N: Complex = cmplx![2., 0.]; + const N: Complex = cmplx!(2., 0.); let mut c = Cache::new(N); let me = gamma_ns(&mut c, NF) + gamma_gq(&mut c, NF); assert_approx_eq_cmplx!(f64, me, Complex::zero(), epsilon = 1e-12); @@ -79,7 +79,7 @@ mod tests { #[test] fn gluon_momentum_conservation() { - const N: Complex = cmplx![2., 0.]; + const N: Complex = cmplx!(2., 0.); let mut c = Cache::new(N); let me = gamma_qg(&mut c, NF) + gamma_gg(&mut c, NF); assert_approx_eq_cmplx!(f64, me, Complex::zero(), epsilon = 1e-12); @@ -87,7 +87,7 @@ mod tests { #[test] fn gamma_qg_() { - const N: Complex = cmplx![1., 0.]; + const N: Complex = cmplx!(1., 0.); let mut c = Cache::new(N); let me = gamma_qg(&mut c, NF); assert_approx_eq_cmplx!(f64, me, cmplx!(-20. / 3., 0.), ulps = 32, epsilon = 1e-12); @@ -95,7 +95,7 @@ mod tests { #[test] fn gamma_gq_() { - const N: Complex = cmplx![0., 1.]; + const N: Complex = cmplx!(0., 1.); let mut c = Cache::new(N); let me = gamma_gq(&mut c, NF); assert_approx_eq_cmplx!(f64, me, cmplx!(4. / 3.0, -4. / 3.0), ulps = 32); @@ -103,7 +103,7 @@ mod tests { #[test] fn gamma_gg_() { - const N: Complex = cmplx![0., 1.]; + const N: Complex = cmplx!(0., 1.); let mut c = Cache::new(N); let me = gamma_gg(&mut c, NF); assert_approx_eq_cmplx!( diff --git a/crates/ekore/src/anomalous_dimensions/unpolarized/spacelike/as3.rs b/crates/ekore/src/anomalous_dimensions/unpolarized/spacelike/as3.rs index 223d9406a..66d61fc76 100644 --- a/crates/ekore/src/anomalous_dimensions/unpolarized/spacelike/as3.rs +++ b/crates/ekore/src/anomalous_dimensions/unpolarized/spacelike/as3.rs @@ -135,7 +135,7 @@ pub fn gamma_nsv(c: &mut Cache, nf: u8) -> Complex { let B12 = -(S1 + 1.0 / (N + 1.0) + 1.0 / (N + 2.0)) / (N + 2.0); let B1M = if N.im.abs() < 1.0e-5 && (N - 1.0).re.abs() < 1.0e-5 { - cmplx![-ZETA2, 0.] + cmplx!(-ZETA2, 0.) } else { -(S1 - 1.0 / N) / (N - 1.0) }; @@ -435,7 +435,7 @@ mod tests { #[test] fn physical_constraints() { // number conservation - let mut c = Cache::new(cmplx![1., 0.]); + let mut c = Cache::new(cmplx!(1., 0.)); assert_approx_eq_cmplx!( f64, gamma_nsv(&mut c, NF), @@ -449,7 +449,7 @@ mod tests { epsilon = 6e-7 ); - let mut c = Cache::new(cmplx![2., 0.]); + let mut c = Cache::new(cmplx!(2., 0.)); let gS2 = gamma_singlet(&mut c, NF); // gluon momentum conservation assert_approx_eq_cmplx!( @@ -469,7 +469,7 @@ mod tests { #[test] fn N2() { - let mut c = Cache::new(cmplx![2., 0.]); + let mut c = Cache::new(cmplx!(2., 0.)); assert_approx_eq_cmplx!( f64, gamma_nsv(&mut c, NF), diff --git a/crates/ekore/src/harmonics/cache.rs b/crates/ekore/src/harmonics/cache.rs index 6d88b46cf..da0f4800b 100644 --- a/crates/ekore/src/harmonics/cache.rs +++ b/crates/ekore/src/harmonics/cache.rs @@ -141,7 +141,7 @@ mod tests { #[test] fn test_recursive_harmonic_sum() { const SX: [fn(Complex) -> Complex; 4] = [w1::S1, w2::S2, w3::S3, w4::S4]; - const NS: [Complex; 2] = [cmplx![1.0, 0.0], cmplx![2.34, 3.45]]; + const NS: [Complex; 2] = [cmplx!(1.0, 0.0), cmplx!(2.34, 3.45)]; const ITERS: [usize; 2] = [1, 2]; for sit in SX.iter().enumerate() { for nit in NS.iter().enumerate() { diff --git a/crates/ekore/src/harmonics/g_functions.rs b/crates/ekore/src/harmonics/g_functions.rs index cfde9e9ea..9b5348476 100644 --- a/crates/ekore/src/harmonics/g_functions.rs +++ b/crates/ekore/src/harmonics/g_functions.rs @@ -32,19 +32,19 @@ mod tests { #[test] fn test_mellin_g3() { - const NS: [Complex; 3] = [cmplx![1.0, 0.0], cmplx![2.0, 0.0], cmplx![1.0, 1.0]]; + const NS: [Complex; 3] = [cmplx!(1.0, 0.0), cmplx!(2.0, 0.0), cmplx!(1.0, 1.0)]; // NIntegrate[x^({1, 2, 1 + I} - 1) PolyLog[2, x]/(1 + x), {x, 0, 1}] const REFVALS: [Complex; 3] = [ - cmplx![0.3888958462, 0.], - cmplx![0.2560382207, 0.], - cmplx![0.3049381491, -0.1589060625], + cmplx!(0.3888958462, 0.), + cmplx!(0.2560382207, 0.), + cmplx!(0.3049381491, -0.1589060625), ]; for it in NS.iter().enumerate() { let n = *it.1; let s1 = w1::S1(n); let refval = REFVALS[it.0]; let g3 = g3(n, s1); - assert_approx_eq_cmplx![f64, g3, refval, epsilon = 1e-6]; + assert_approx_eq_cmplx!(f64, g3, refval, epsilon = 1e-6); } } } diff --git a/crates/ekore/src/harmonics/polygamma.rs b/crates/ekore/src/harmonics/polygamma.rs index 7415db88e..c9c504adb 100644 --- a/crates/ekore/src/harmonics/polygamma.rs +++ b/crates/ekore/src/harmonics/polygamma.rs @@ -127,73 +127,73 @@ mod tests { #[test] fn fortran() { const ZS: [Complex; 9] = [ - cmplx![1.0, 0.], - cmplx![2.0, 0.], - cmplx![3.0, 0.], - cmplx![0., 1.], - cmplx![-1., 1.], - cmplx![-2., 1.], - cmplx![-1., 2.], - cmplx![-2., 2.], - cmplx![-3., 2.], + cmplx!(1.0, 0.), + cmplx!(2.0, 0.), + cmplx!(3.0, 0.), + cmplx!(0., 1.), + cmplx!(-1., 1.), + cmplx!(-2., 1.), + cmplx!(-1., 2.), + cmplx!(-2., 2.), + cmplx!(-3., 2.), ]; const KS: [usize; 5] = [0, 1, 2, 3, 4]; const FORTRAN_REF: [[Complex; 9]; 5] = [ [ - cmplx![-0.5772156649015332, 0.], - cmplx![0.42278433509846636, 0.], - cmplx![0.9227843350984672, 0.], - cmplx![0.09465032062247669, 2.0766740474685816], - cmplx![0.5946503206224767, 2.5766740474685816], - cmplx![0.9946503206224772, 2.7766740474685814], - cmplx![0.9145915153739776, 2.2208072826422303], - cmplx![1.1645915153739772, 2.47080728264223], - cmplx![1.395360746143208, 2.624653436488384], + cmplx!(-0.5772156649015332, 0.), + cmplx!(0.42278433509846636, 0.), + cmplx!(0.9227843350984672, 0.), + cmplx!(0.09465032062247669, 2.0766740474685816), + cmplx!(0.5946503206224767, 2.5766740474685816), + cmplx!(0.9946503206224772, 2.7766740474685814), + cmplx!(0.9145915153739776, 2.2208072826422303), + cmplx!(1.1645915153739772, 2.47080728264223), + cmplx!(1.395360746143208, 2.624653436488384), ], [ - cmplx![1.6449340668482264, 0.], - cmplx![0.6449340668482264, 0.], - cmplx![0.3949340668482264, 0.], - cmplx![-0.5369999033772361, -0.7942335427593189], - cmplx![-0.5369999033772362, -0.2942335427593189], - cmplx![-0.4169999033772362, -0.13423354275931887], - cmplx![-0.24506883785905695, -0.3178255501472297], - cmplx![-0.24506883785905695, -0.19282555014722969], - cmplx![-0.21548303904248892, -0.12181963298746643], + cmplx!(1.6449340668482264, 0.), + cmplx!(0.6449340668482264, 0.), + cmplx!(0.3949340668482264, 0.), + cmplx!(-0.5369999033772361, -0.7942335427593189), + cmplx!(-0.5369999033772362, -0.2942335427593189), + cmplx!(-0.4169999033772362, -0.13423354275931887), + cmplx!(-0.24506883785905695, -0.3178255501472297), + cmplx!(-0.24506883785905695, -0.19282555014722969), + cmplx!(-0.21548303904248892, -0.12181963298746643), ], [ - cmplx![-2.404113806319188, 0.], - cmplx![-0.40411380631918853, 0.], - cmplx![-0.15411380631918858, 0.], - cmplx![0.3685529315879351, -1.233347149654934], - cmplx![-0.13144706841206477, -0.7333471496549337], - cmplx![-0.09944706841206462, -0.5573471496549336], - cmplx![0.03902435405364951, -0.15743252404131272], - cmplx![-0.02347564594635048, -0.09493252404131272], - cmplx![-0.031668636387861625, -0.053057239562477945], + cmplx!(-2.404113806319188, 0.), + cmplx!(-0.40411380631918853, 0.), + cmplx!(-0.15411380631918858, 0.), + cmplx!(0.3685529315879351, -1.233347149654934), + cmplx!(-0.13144706841206477, -0.7333471496549337), + cmplx!(-0.09944706841206462, -0.5573471496549336), + cmplx!(0.03902435405364951, -0.15743252404131272), + cmplx!(-0.02347564594635048, -0.09493252404131272), + cmplx!(-0.031668636387861625, -0.053057239562477945), ], [ - cmplx![6.49393940226683, 0.], - cmplx![0.49393940226682925, 0.], - cmplx![0.11893940226682913, 0.], - cmplx![4.4771255510465044, -0.31728657866196064], - cmplx![2.9771255510464925, -0.3172865786619599], - cmplx![2.909925551046492, -0.08688657866195917], - cmplx![0.12301766661068443, -0.05523068481179527], - cmplx![0.02926766661068438, -0.055230684811795216], - cmplx![0.004268541930176011, -0.03002148345329936], + cmplx!(6.49393940226683, 0.), + cmplx!(0.49393940226682925, 0.), + cmplx!(0.11893940226682913, 0.), + cmplx!(4.4771255510465044, -0.31728657866196064), + cmplx!(2.9771255510464925, -0.3172865786619599), + cmplx!(2.909925551046492, -0.08688657866195917), + cmplx!(0.12301766661068443, -0.05523068481179527), + cmplx!(0.02926766661068438, -0.055230684811795216), + cmplx!(0.004268541930176011, -0.03002148345329936), ], [ - cmplx![-24.88626612344089, 0.], - cmplx![-0.8862661234408784, 0.], - cmplx![-0.13626612344087824, 0.], - cmplx![3.2795081690440493, 21.41938794863803], - cmplx![0.2795081690440445, 18.419387948637894], - cmplx![-0.012331830955960252, 18.734267948637896], - cmplx![0.14223316576854003, 0.10023607930398608], - cmplx![0.04848316576854002, 0.006486079303986134], - cmplx![0.009893695996688708, 0.014372034600746361], + cmplx!(-24.88626612344089, 0.), + cmplx!(-0.8862661234408784, 0.), + cmplx!(-0.13626612344087824, 0.), + cmplx!(3.2795081690440493, 21.41938794863803), + cmplx!(0.2795081690440445, 18.419387948637894), + cmplx!(-0.012331830955960252, 18.734267948637896), + cmplx!(0.14223316576854003, 0.10023607930398608), + cmplx!(0.04848316576854002, 0.006486079303986134), + cmplx!(0.009893695996688708, 0.014372034600746361), ], ]; for kit in KS.iter().enumerate() { diff --git a/crates/ekore/src/operator_matrix_elements/unpolarized/spacelike/as1.rs b/crates/ekore/src/operator_matrix_elements/unpolarized/spacelike/as1.rs index 898d3d0c4..960efe43c 100644 --- a/crates/ekore/src/operator_matrix_elements/unpolarized/spacelike/as1.rs +++ b/crates/ekore/src/operator_matrix_elements/unpolarized/spacelike/as1.rs @@ -51,7 +51,7 @@ pub fn A_hg(c: &mut Cache, _nf: u8, L: f64) -> Complex { /// /// Implements Eq. (B.6) of [\[Buza:1996wv\]](crate::bib::Buza1996wv). pub fn A_gg(_c: &mut Cache, _nf: u8, L: f64) -> Complex { - cmplx![-2.0 / 3.0 * L, 0.] + cmplx!(-2.0 / 3.0 * L, 0.) } /// Compute the |NLO| singlet |OME|. @@ -132,7 +132,7 @@ mod tests { ]; for n in 0..4 { - let N = cmplx![2. * (n as f64) + 2., 0.]; + let N = cmplx!(2. * (n as f64) + 2., 0.); let mut c = Cache::new(N); let aS1 = A_singlet(&mut c, NF, L); assert_approx_eq_cmplx!(f64, aS1[0][0], cmplx!(ref_val_gg[n], 0.), epsilon = 1e-6);