mirror of
				https://github.com/Z3Prover/z3
				synced 2025-11-04 05:19:11 +00:00 
			
		
		
		
	C++ API add missing FP methods (#5199)
* added is_nan and is_inf to API * added support to to_ieee_bv
This commit is contained in:
		
							parent
							
								
									542878dea3
								
							
						
					
					
						commit
						10e9345cd7
					
				
					 1 changed files with 30 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -870,6 +870,36 @@ namespace z3 {
 | 
			
		|||
        */
 | 
			
		||||
        bool is_well_sorted() const { bool r = Z3_is_well_sorted(ctx(), m_ast); check_error(); return r; }
 | 
			
		||||
 | 
			
		||||
        /**
 | 
			
		||||
           \brief Return true if this expression is an fpa and is inf
 | 
			
		||||
        */
 | 
			
		||||
        bool is_inf() const {
 | 
			
		||||
            assert(is_fpa());
 | 
			
		||||
            Z3_ast r = Z3_mk_fpa_is_infinite(ctx(), m_ast);
 | 
			
		||||
            check_error();
 | 
			
		||||
            return expr(ctx(), r);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        /**
 | 
			
		||||
           \brief Return true if this expression is an fpa and is NaN
 | 
			
		||||
        */
 | 
			
		||||
        bool is_nan() const {
 | 
			
		||||
            assert(is_fpa());
 | 
			
		||||
            Z3_ast r = Z3_mk_fpa_is_nan(ctx(), m_ast);
 | 
			
		||||
            check_error();
 | 
			
		||||
            return expr(ctx(), r);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        /**
 | 
			
		||||
           \brief Convert this fpa into an IEEE BV
 | 
			
		||||
        */
 | 
			
		||||
        bool to_ieee_bv() const {
 | 
			
		||||
            assert(is_fpa());
 | 
			
		||||
            Z3_ast r = Z3_mk_fpa_to_ieee_bv(ctx(), m_ast),
 | 
			
		||||
            check_error();
 | 
			
		||||
            return expr(ctx(), r);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        /**
 | 
			
		||||
           \brief Return string representation of numeral or algebraic number
 | 
			
		||||
           This method assumes the expression is numeral or algebraic
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue