mirror of
				https://github.com/Z3Prover/z3
				synced 2025-11-04 13:29:11 +00:00 
			
		
		
		
	expose numerator/denominators for Martin and Giles
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
		
							parent
							
								
									b42973152f
								
							
						
					
					
						commit
						4c6efbbc8b
					
				
					 1 changed files with 14 additions and 0 deletions
				
			
		| 
						 | 
					@ -758,6 +758,20 @@ namespace z3 {
 | 
				
			||||||
            return result;
 | 
					            return result;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
           
 | 
					           
 | 
				
			||||||
 | 
					        expr numerator() const { 
 | 
				
			||||||
 | 
					            assert(is_numeral());
 | 
				
			||||||
 | 
					            Z3_ast r = Z3_get_numerator(ctx(), m_ast);
 | 
				
			||||||
 | 
					            check_error();
 | 
				
			||||||
 | 
					            return expr(ctx(),r);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        expr denominator() const { 
 | 
				
			||||||
 | 
					            assert(is_numeral());
 | 
				
			||||||
 | 
					            Z3_ast r = Z3_get_denominator(ctx(), m_ast);
 | 
				
			||||||
 | 
					            check_error();
 | 
				
			||||||
 | 
					            return expr(ctx(),r);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        operator Z3_app() const { assert(is_app()); return reinterpret_cast<Z3_app>(m_ast); }
 | 
					        operator Z3_app() const { assert(is_app()); return reinterpret_cast<Z3_app>(m_ast); }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue