File tree Expand file tree Collapse file tree
deep_causality_physics/tests
deep_causality_rand/tests
deep_causality_uncertain/tests/types Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -88,10 +88,6 @@ fn test_log10() {
8888}
8989
9090#[ test]
91- // Disabled under Miri: software-emulated floats produce different last-bit
92- // results for transcendental ops, so exact equality cannot hold. The test
93- // itself is correct and runs under normal CI.
94- #[ cfg_attr( miri, ignore) ]
9591fn test_powf ( ) {
9692 let x = 2.0_f64 ;
9793 let n = 3.0_f64 ;
Original file line number Diff line number Diff line change 22 * SPDX-License-Identifier: MIT
33 * Copyright (c) 2023 - 2026. The DeepCausality Authors and Contributors. All Rights Reserved.
44 */
5+
6+ // Disabled under Miri: software-emulated floats produce different last-bit
7+ // results for transcendental ops, so exact equality cannot hold. The test
8+ // itself is correct and runs under normal CI.
59#[ cfg( test) ]
10+ #[ cfg( not( miri) ) ]
611mod algebra_tests;
712#[ cfg( test) ]
813mod domain_euclidean_tests;
14+ // Disabled under Miri: software-emulated floats produce different last-bit
15+ // results for transcendental ops, so exact equality cannot hold. The test
16+ // itself is correct and runs under normal CI.
917#[ cfg( test) ]
18+ #[ cfg( not( miri) ) ]
1019mod field_real_f32_tests;
20+ // Disabled under Miri: software-emulated floats produce different last-bit
21+ // results for transcendental ops, so exact equality cannot hold. The test
22+ // itself is correct and runs under normal CI.
1123#[ cfg( test) ]
12- mod field_real_f64_tests;
24+ #[ cfg( not( miri) ) ]
25+ pub ( crate ) mod field_real_f64_tests;
26+ // Disabled under Miri: software-emulated floats produce different last-bit
27+ // results for transcendental ops, so exact equality cannot hold. The test
28+ // itself is correct and runs under normal CI.
1329#[ cfg( test) ]
30+ #[ cfg( not( miri) ) ]
1431mod real_tests;
Original file line number Diff line number Diff line change 22 * SPDX-License-Identifier: MIT
33 * Copyright (c) 2023 - 2026. The DeepCausality Authors and Contributors. All Rights Reserved.
44 */
5+
6+ // Disabled under Miri: software-emulated floats produce different last-bit
7+ // results for transcendental ops, so exact equality cannot hold. The test
8+ // itself is correct and runs under normal CI.
59#[ cfg( test) ]
10+ #[ cfg( not( miri) ) ]
611mod float_32_tests;
7- // Skipped wholesale under Miri: this module exercises f64 floating-point
8- // behavior, much of it via exact `assert_eq!` on transcendental results
9- // (sin/cos/cbrt/atan2/...). Miri's soft-float emulation differs from hardware
10- // in the last bit, so these comparisons spuriously fail one by one. The tests
11- // are correct and pass under normal CI.
12- #[ cfg( all( test, not( miri) ) ) ]
12+ // Disabled under Miri: software-emulated floats produce different last-bit
13+ // results for transcendental ops, so exact equality cannot hold. The test
14+ // itself is correct and runs under normal CI.
15+ #[ cfg( test) ]
16+ #[ cfg( not( miri) ) ]
1317mod float_64_tests;
Original file line number Diff line number Diff line change @@ -14,7 +14,11 @@ mod double_attributes_tests;
1414mod double_comparison_tests;
1515#[ cfg( test) ]
1616mod double_display_tests;
17+ // Disabled under Miri: software-emulated floats produce different last-bit
18+ // results for transcendental ops, so exact equality cannot hold. The test
19+ // itself is correct and runs under normal CI.
1720#[ cfg( test) ]
21+ #[ cfg( not( miri) ) ]
1822mod double_erf_tests;
1923#[ cfg( test) ]
2024mod double_float_tests;
@@ -26,5 +30,9 @@ mod double_num_traits_tests;
2630mod double_ops_tests;
2731#[ cfg( test) ]
2832mod double_traits_tests;
33+ // Disabled under Miri: software-emulated floats produce different last-bit
34+ // results for transcendental ops, so exact equality cannot hold. The test
35+ // itself is correct and runs under normal CI.
2936#[ cfg( test) ]
37+ #[ cfg( not( miri) ) ]
3038mod double_transcendental_tests;
Original file line number Diff line number Diff line change @@ -371,8 +371,6 @@ rust_test_suite(
371371 ],
372372)
373373
374-
375-
376374rust_test_suite (
377375 name = "theories" ,
378376 srcs = glob ([
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ use deep_causality_rand::types::distr::normal::standard_normal::StandardNormal;
88macro_rules! standard_normal_tests {
99 ( $float_type: ty, $tolerance: expr) => {
1010 #[ test]
11+ #[ cfg_attr( miri, ignore) ]
1112 fn test_mean_and_std_dev( ) {
1213 let mut rng = rng( ) ;
1314 let distr = StandardNormal ;
@@ -91,6 +92,7 @@ mod f106_tests {
9192 use deep_causality_rand:: rng;
9293
9394 #[ test]
95+ #[ cfg_attr( miri, ignore) ]
9496 fn test_mean_and_std_dev ( ) {
9597 let mut rng = rng ( ) ;
9698 let distr = StandardNormal ;
Original file line number Diff line number Diff line change 44 */
55
66#[ cfg( test) ]
7+ #[ cfg( not( miri) ) ]
78mod standard_uniform_tests;
89#[ cfg( test) ]
10+ #[ cfg( not( miri) ) ]
911mod uniform_tests;
Original file line number Diff line number Diff line change 33 * Copyright (c) 2023 - 2026. The DeepCausality Authors and Contributors. All Rights Reserved.
44 */
55#[ cfg( test) ]
6+ // Disabled under Miri: Miri's soft-float emulation drifts by ~1 ULP (got 0.9999999996 vs 1)
7+ #[ cfg( not( miri) ) ]
68mod inverse_cdf_tests;
79#[ cfg( test) ]
10+ // Disabled under Miri: Miri's soft-float emulation drifts by ~1 ULP (got 0.9999999996 vs 1)
11+ #[ cfg( not( miri) ) ]
812mod sobol_tests;
Original file line number Diff line number Diff line change 33 * Copyright (c) 2023 - 2026. The DeepCausality Authors and Contributors. All Rights Reserved.
44 */
55#[ cfg( test) ]
6+ // Disabled under Miri: Miri's soft-float emulation drifts by ~1 ULP (got 0.9999999996 vs 1)
7+ #[ cfg( not( miri) ) ]
68mod qmc_sampler_tests;
79#[ cfg( test) ]
810mod sampler_seed_tests;
911#[ cfg( test) ]
12+ // Disabled under Miri: Miri's soft-float emulation drifts by ~1 ULP (got 0.9999999996 vs 1)
13+ #[ cfg( not( miri) ) ]
1014mod sequential_sampler_tests;
Original file line number Diff line number Diff line change @@ -363,10 +363,6 @@ fn test_logical_op_errors() {
363363}
364364
365365#[ test]
366- // Disabled under Miri: the sampler evaluates `x.powi(2)` on f64, which under
367- // Miri's soft-float emulation drifts by ~1 ULP (got 99.99999999999996 vs
368- // 100.0). Test is correct under normal CI.
369- #[ cfg_attr( miri, ignore) ]
370366fn test_function_op_f64 ( ) {
371367 let sampler = SequentialSampler ;
372368 let operand = create_node ( UncertainNodeContent :: Value ( SampledValue :: Float ( 10.0f64 ) ) ) ;
You can’t perform that action at this time.
0 commit comments