You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							14 lines
						
					
					
						
							245 B
						
					
					
				
			
		
		
		
			
			
			
				
					
				
				
					
				
			
		
		
	
	
							14 lines
						
					
					
						
							245 B
						
					
					
				
								#include "test_I.h"
							 | 
						|
								
							 | 
						|
								int test_I_oddp (int iterations)
							 | 
						|
								{
							 | 
						|
									int error = 0;
							 | 
						|
									int i;
							 | 
						|
									// Check against division.
							 | 
						|
									for (i = iterations; i > 0; i--) {
							 | 
						|
										cl_I a = testrandom_I();
							 | 
						|
										cl_I r = mod(a,2);
							 | 
						|
										ASSERT1(oddp(a) == (r!=0), a);
							 | 
						|
									}
							 | 
						|
									return error;
							 | 
						|
								}
							 |