mirror of
				https://github.com/Z3Prover/z3
				synced 2025-10-30 11:12:28 +00:00 
			
		
		
		
	Use parity helper functions
This commit is contained in:
		
							parent
							
								
									bf03886a87
								
							
						
					
					
						commit
						a0f5386bdd
					
				
					 5 changed files with 33 additions and 40 deletions
				
			
		|  | @ -501,6 +501,15 @@ public: | |||
|         return k; | ||||
|     } | ||||
| 
 | ||||
|     /** Number of trailing zeros in an N-bit representation */ | ||||
|     unsigned parity(unsigned num_bits) const { | ||||
|         SASSERT(!is_neg()); | ||||
|         SASSERT(*this < rational::power_of_two(num_bits)); | ||||
|         if (is_zero()) | ||||
|             return num_bits; | ||||
|         return trailing_zeros(); | ||||
|     } | ||||
| 
 | ||||
|     static bool limit_denominator(rational &num, rational const& limit); | ||||
| }; | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue