mirror of
				https://github.com/Z3Prover/z3
				synced 2025-11-03 21:09:11 +00:00 
			
		
		
		
	normalize more pretty printing
This commit is contained in:
		
							parent
							
								
									309473edad
								
							
						
					
					
						commit
						31ffe89480
					
				
					 3 changed files with 7 additions and 4 deletions
				
			
		| 
						 | 
				
			
			@ -1627,9 +1627,9 @@ namespace dd {
 | 
			
		|||
            rational c = abs(m.first);
 | 
			
		||||
            m.second.reverse();
 | 
			
		||||
            if (!c.is_one() || m.second.empty()) {
 | 
			
		||||
                if (m_semantics == mod2N_e && mod(-c, m_mod2N) < c)
 | 
			
		||||
                    out << -mod(-c, m_mod2N);
 | 
			
		||||
                else 
 | 
			
		||||
                if (m_semantics == mod2N_e)
 | 
			
		||||
                    out << normalize(c);
 | 
			
		||||
                else
 | 
			
		||||
                    out << c;
 | 
			
		||||
                if (!m.second.empty()) out << "*";
 | 
			
		||||
            }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -374,6 +374,8 @@ namespace dd {
 | 
			
		|||
        unsigned power_of_2() const { return m_power_of_2; }
 | 
			
		||||
        rational const& max_value() const { return m_max_value; }
 | 
			
		||||
        rational const& two_to_N() const { return m_mod2N; }
 | 
			
		||||
        rational normalize(rational const& n) const { return mod(-n, m_mod2N) < n ? -mod(-n, m_mod2N) : n; }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        unsigned_vector const& free_vars(pdd const& p);
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -118,10 +118,11 @@ namespace polysat {
 | 
			
		|||
    };
 | 
			
		||||
 | 
			
		||||
    inline std::ostream& operator<<(std::ostream& os, eval_interval const& i) {
 | 
			
		||||
        auto& m = i.hi().manager();
 | 
			
		||||
        if (i.is_full())
 | 
			
		||||
            return os << "full";
 | 
			
		||||
        else
 | 
			
		||||
            return os << i.symbolic() << " := [" << i.lo_val() << ";" << i.hi_val() << "[";
 | 
			
		||||
            return os << i.symbolic() << " := [" << m.normalize(i.lo_val()) << ";" << m.normalize(i.hi_val()) << "[";
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue