mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-11-03 22:49:17 +00:00 
			
		
		
		
	Add a generator that will test all inputs for input spaces `u32::MAX` or
smaller (e.g. single-argument `f32` routines).  For anything larger,
still run approximately `u32::MAX` tests, but distribute inputs evenly
across the function domain.
Since we often only want to run one of these tests at a time, this
implementation parallelizes within each test using `rayon`. A custom
test runner is used so a progress bar is possible.
Specific tests must be enabled by setting the `LIBM_EXTENSIVE_TESTS`
environment variable, e.g.
    LIBM_EXTENSIVE_TESTS=all_f16,cos,cosf cargo run ...
Testing on a recent machine, most tests take about two minutes or less.
The Bessel functions are quite slow and take closer to 10 minutes, and
FMA is increased to run for about the same.
		
	
			
		
			
				
	
	
		
			15 lines
		
	
	
		
			306 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			15 lines
		
	
	
		
			306 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
//! `main` is just a wrapper to handle configuration.
 | 
						|
 | 
						|
#[cfg(not(feature = "test-multiprecision"))]
 | 
						|
fn main() {
 | 
						|
    eprintln!("multiprecision not enabled; skipping extensive tests");
 | 
						|
}
 | 
						|
 | 
						|
#[cfg(feature = "test-multiprecision")]
 | 
						|
mod run;
 | 
						|
 | 
						|
#[cfg(feature = "test-multiprecision")]
 | 
						|
fn main() {
 | 
						|
    run::run();
 | 
						|
}
 |